UNITED NATIONS (AP) — The U.N. Security Council unanimously approved a resolution Thursday welcoming recent efforts to bring opposing sides together on the conflict in Libya, which Secretary-General Antonio Guterres is calling ripe for mediation to end the chaos and restore peace.

The resolution extends the U.N. political mission in the country until Sept. 15, 2018, with a mandate "to exercise mediation and good offices" to support "an inclusive political process" and a Libyan transition.

Libya sank into chaos following the 2011 uprising that toppled and killed dictator Moammar Gadhafi. It is split between rival parliaments and governments in the east and west, each backed by a set of militias, tribes and political factions.

But in late July, President Fayez Sarraj of Libya's U.N.-recognized unity government in the west and eastern military leader Gen. Khalifa Haftar met in Paris and committed to a cease-fire. They also agreed to work toward presidential and parliamentary elections and to find a roadmap for securing the lawless country against terrorism and trafficking.

Guterres told reporters Wednesday that he sees Libya as the top priority for mediation, saying he believes "progress can be made in the short term." He appealed to all countries with influence in Libya and all Libyans "to seize this opportunity and to be able to overcome the divisions and move in the direction of a solution."

Libya's acting ambassador, Elmahdi Elmajerbi, welcomed the vote.

"The political crisis is the crisis that needs to be resolved," Elmajerbi told the council. "This is the key which will allow us to overcome all of the other challenges facing my country."

He said legislative, executive and judicial powers need to be separated "and we need a united single army which will work under the authority of a civilian power."

Elmajerbi said the influx of thousands of migrants is linked to the lack of stability and those people are "living in incredibly difficult conditions."