US Secretary of State John Kerry (center) and British Secretary of State for Foreign and Commonwealth Affairs Philip Anthony Hammond (right) speak during a UN Security Council meeting on Syria at the United Nations on Dec. 18.Getty Images

World powers agreed Friday on a draft UN resolution that paves the way toward ending Syria’s nearly 5-year-old bloody civil war — calling for formal peace talks and a ceasefire to be launched in early January.

US Secretary of State John Kerry was to chair a meeting of the UN Security Council on Friday afternoon to vote on the measure after a meeting of 17 foreign ministers on the war, which has claimed about 300,000 lives, AFP reported.

The ministers rushed Friday to resolve difficult issues, including figuring out which Syrian groups will represent the opposition in peace talks and which groups will be deemed to be terrorist organizations.

The US, Russia and the other three permanent Security Council members — France, Britain and China — sought UN endorsement to show international unity on the Syrian crisis.

The draft text, obtained by AFP, said the “only sustainable solution to the current crisis in Syria is through an inclusive and Syrian-led political process that meets the legitimate aspirations of the Syrian people.”

The measure calls for an “inclusive transitional governing body with full executive powers” in Syria.

It also asks the UN to bring the Syrian government and the opposition to the table for negotiations on a political transition “with a target of early January 2016,” AFP reported

But the draft does not address one of the thorniest issues in the peace effort: the fate of Syrian leader Bashar Al-Assad.

President Obama reaffirmed his administration’s position that Assad must leave power.

“I think that Assad is going to have to leave in order for the country to stop the blood(shed), for all the parties involved to be able to move forward in a nonsectarian way,” Obama said during his year-end news conference. “He has lost legitimacy in the eyes of the country.”

The 17 members of the so-called International Syria Support Group metFriday morning at New York’s Palace Hotel and the 15-nation Security Council met later on a resolution.

The talks were the first meeting of the support group since Saudi Arabia assembled a coalition of Syrian rebel groups to form an opposition negotiating team, AFP reported.

Jordan’s foreign minister said he was compiling a list of terrorist groups in Syria that will be banned from the talks – along with the blacklisted ISIS and the Al-Qaeda-linked Nusra Front.

“The initial work has been done. Now I think that there will be follow-up meetings,” said Nasser Judeh.

Twenty nations agreed last month in Vienna to a peace plan that sets aJan. 1 deadline for the start of negotiations between Assad’s government and opposition groups.

Under the Vienna agreement, there would be a six-month political transition period after a ceasefire began — but the rebels have demanded that Assad step down immediately.

Russia has dismissed this idea and Kerry said in Moscow this week that it was a “non-starter.”

Kerry sought to assure Assad’s key ally, Russian President Vladimir Putin, that Washington is not seeking “regime change” in Syria.

Syria’s main opposition group, the Syrian National Coalition, said that reaching a ceasefire by Jan. 1 was unrealistic — and demanded that Russia end its air strikes, AFP reported.

Najib Ghadbian, the SNC’s envoy to the UN, said opposition groups need “a month or so” to prepare for political talks.

Assad, in an interview with Dutch TV, reacted sarcastically when asked whether he was comforted that Washington’s stance on his departure was apparently softening.

“I was packing my luggage. I had to leave, but now I can stay,” he said.