Speaking after the meeting in Ukraine's Lviv, Erdogan said they discussed using the positive atmosphere created by a U.N.-brokered grain export deal to establish lasting peace.

He also said they discussed the exchange of prisoners of war between Ukraine and Russia, and that he would later raise the issue with Russian President Vladimir Putin.

"We attach great importance to this issue...of what happened to the exchange of these captives," Erdogan said.

(Reporting by Ali Kucukgocmen and Ezgi Erkoyun; Editing by Jonathan Spicer)