MOSCOW — The leaders of Russia, Turkey and Iran on Wednesday discussed ways to promote a peaceful settlement in Syria, including the return of refugees, humanitarian aid and prisoners’ exchange, while fractured Syrian opposition groups were meeting in Saudi Arabia in a bid to overcome their divisions and form a united front for Syrian peace talks in Geneva.

“Militants in Syria have received a decisive blow, and there is a real chance to put an end to the civil war that has raged for many years,” Russian President Vladimir Putin said at the start of talks with Turkish and Iranian counterparts in the Russian Black Sea resort of Sochi.

Putin noted that political settlement will require concessions from all sides, including Syrian President Bashar Assad’s government.

Assad made a surprise trip to Russia late Monday for talks with Putin, which the Kremlin said were intended to lay the groundwork for Wednesday’s trilateral meeting.

Speaking after the three-way talks, Putin said the Syrian leader pledged to conduct constitutional reforms and hold new elections under U.N. supervision. “The process of reforms isn’t going to be easy and will require concessions and compromises from all those involved, including the Syrian government,” he said.

In their joint statement after the talks, Putin, Iranian President Hassan Rouhani and Turkish President Recep Tayyip Erdogan emphasized the need for all parties in the Syrian conflict to release all prisoners and hostages, hand over bodies and search for those missing to help create conditions for a lasting cease-fire and the launch of political talks.

They also called on other countries to provide humanitarian aid, clear Syrian territory of mines and restore vital infrastructure destroyed by the war.

“We have reached a consensus on helping the transition to an inclusive, free, fair and transparent political process that will be carried out under the leadership and ownership of the Syrian people,” Erdogan said.

Even though Russia and Iran have backed Assad’s government since the start of the Syrian conflict in March 2011, while Turkey has supported his foes, the three countries have teamed up to help mediate a peace settlement.

They have sponsored several rounds of talks between the Syrian government and the opposition in Astana, Kazakhstan, and also have brokered a truce between Syria’s government and the rebels in four areas, helping reduce hostilities.

U.N. deputy spokesman Farhan Haq, asked about the trilateral meeting of the leaders, said: “Our focus remains on the meetings that will begin in Geneva on Nov. 28. We hope that all the other processes that are underway will contribute to a successful round of talks in Geneva.”

Meanwhile, the U.N. envoy for Syria, Staffan de Mistura spoke at the opening of a three-day gathering of the Syrian opposition in Riyadh, where around 30 opposition groups are expected to come up with a unified delegation and a vision for the Geneva talks.

De Mistura said he planned to have two rounds of talks in Geneva in December. He is set to travel to Moscow later this week. “It is our common interest that today, you elect the best and most inclusive team among yourselves,” de Mistura said. “A strong, unified team is a creative partner in Geneva and we need that.”

The Riyadh meeting, however, has already been marred with disagreements. The notoriously fragmented opposition is divided by visions of a future role for Assad, the length of a transitional period as well as the constitution that will see the country move toward elections.

Saudi Foreign Minister Adel al-Jubeir said in opening remarks that the opposition meeting comes amid international consensus to reach a resolution.

“There is no resolution to the crisis without Syrian consensus that achieves the demands of the Syrian people and ends their suffering,” al-Jubeir said.

Russia, which has welcomed the Saudi efforts to unify the opposition, will also be hosting a meeting in Sochi that’s expected to bring the opposition and Syrian government together in early December.