(Bloomberg) -- Turkish President Recep Tayyip Erdogan said he discussed avenues to end the Russia’s war during talks with his Ukrainian counterpart, as well as conditions for a possible prisoners exchange. 

The comments came after the Turkish leader met in the western Ukrainian city of Lviv with President Volodymyr Zelenskiy and United Nations Secretary General Antonio Guterres on Thursday. Erdogan said he would follow up on the discussions with Russian President Vladimir Putin. 

“I maintain my belief that the war will come to an end at the negotiation table,” Erdogan said in statements after the meeting broadcast by Turkey’s A Haber. “The focus of the talks was how to ultimately end the war.” 

Erdogan, who met with Putin in Sochi two weeks ago, has pushed for a mediating role between the Kremlin and Ukraine. Even as the Turkish leader has maintained his contacts with Putin, his government has maintained military links with Ukraine and supplies Kyiv with drones to help counter the invasion. 

Zelenskiy said peace talks with Moscow are possible only after Ukrainian territories, occupied by Russian troops, are liberated.  

While Erdogan has condemned Russia’s war in Ukraine, Turkey has refrained from adopting US and European sanctions against Moscow. Erdogan brokered an agreement in late July on Ukrainian grain exports, and also offered Istanbul as location for Russia-Ukraine talks in March. Those contacts have since been dropped. 

Moscow has come to view Erdogan as a potential go-between in the conflict, according to two people familiar with the Kremlin’s thinking, who asked not to be identified because the matter is sensitive. Kyiv also sees him as a person who has special relations with Putin. 

“President Erdogan has a good relationship with both President Zelenskiy and Putin - the benefits of which was clearly highlighted to us by his instrumental role in securing the grain deal between the two countries,” said David Zaikin, chief executive officer at London-based Key Elements Group. “His efforts could yield results - but ultimately it’s not entirely in his hands.”

To read more: Ukraine’s New Grain Corridor Is Working, Bringing Down Prices

In a statement earlier, Zelenskiy said he discussed with Erdogan what he called Russia’s large-scale theft of grain from occupied territory, putting the figure at almost 500,000 tons.  “The leaders agreed that any trade in stolen goods is unacceptable,” the Ukrainian leader said in a statement. The sides also discussed situation at Zaporizhzhia nuclear power plant, the largest in Europe and seized by Russia in early March. 

“The presidents and the secretary-general coordinated their acts on key issues: grain corridor, Zaporizhzhia nuclear power plant and release of our war prisoners,” Ukrainian Foreign Minister Dmytro Kuleba said in a video from Lviv. “They agreed on what to do next. Nobody was pushing us to make concessions to Russia.” 

(Updats with analyst comment in eight paragraph, Kuleba in last)

©2022 Bloomberg L.P.