TANZANIA -- The UN Security Council adopted a resolution Tuesday demanding that all countries enforce the widely violated UN arms embargo on Libya, withdraw all mercenaries from the North African nation.

The council also called for political talks and a cease-fire in the war, stressing it has no military solution. The vote was 13-0, with Russia and China abstaining.

In the years after the 2011 uprising that toppled longtime autocrat Moammar Gadhafi, Libya has sunk further into turmoil and is now divided between two rival administrations, based in the country's east and west, with an array of fighters and militias -- backed by various foreign powers -- allied with each side.

The resolution's approval follows a recent report by UN experts monitoring sanctions on Libya that accused its warring parties and their international backers -- the United Arab Emirates, Russia and Jordan on one side and Turkey and Qatar on the other -- of violating the arms embargo, saying it remains "totally ineffective."

The resolution also extended UN's political mission in Libya, or UNSMIL, until next September and stressed its "central role in facilitating a Libyan-led and Libyan-owned inclusive political process and in achieving a lasting cease-fire."

The job of former UN special representative Ghassan Salame, who resigned in March, has been split into two, as the United States demanded, putting a special envoy in charge of UNSMIL to focus on mediating with Libyan and international parties to end the conflict, with a co-ordinator in charge of day-to-day operations.

The U.S. demand held up a replacement for Salame and the resolution asks Secretary-General Antonio Guterres to appoint a special envoy "without delay."

Tensions in oil-rich Libya escalated further when east-based forces, under commander Khalifa Hifter, launched an offensive in April 2019 trying to capture the capital, Tripoli. But Hifter's campaign collapsed in June when militias backing the UN-supported government in Tripoli, with Turkish support, gained the upper hand, driving his forces from the outskirts of the capital and other western towns.

Hifter is supported by the United Arab Emirates, Russia, Jordan and Egypt while the Tripoli forces are supported by the wealthy Gulf state of Qatar and by Turkey, a bitter rival of Egypt and the UAE in a broader regional struggle over political Islam.

Since Turkey and the UAE stepped up their direct involvement in Libya, "arms transfers to Libya by those two member states have been extensive, blatant and with complete disregard to the sanctions measures," UN experts said.

In addition to countries that supplied weapons, the experts said 11 companies also violated the arms embargo, including the Wagner Group, a private Russian security company that in May provided between 800 and 1,200 mercenaries to support Hifter's forces. The warring sides and their international backers also failed to inspect aircraft or vessels believed to carry weapons and ammunition.

The UN resolution called on all parties "to commit without delay to a lasting cease-fire and political dialogue under the leadership" of the new special envoy. It condemned "the forced shutdown of oil facilities," reiterating that "Libya's oil resources are for the benefit of all Libyans" and that the government in Tripoli "retains sole oversight over Libya's economic and financial institutions."

The resolution also expresses "grave concern at the deteriorating humanitarian situation," including insufficient basic services, the plight of migrants, refugees and Libyans displaced in the country, and reports of sexual and gender-based violence. It calls on Libyan authorities to take steps to close detention centres and speed delivery of services throughout the country.