Turkish President Recep Tayyip Erdogan and his Egyptian counterpart Abdel Fattah al-Sisi met on Sunday in Qatar for the first time, a picture from Turkey's presidency showed.
Erdogan and Sisi have been sparring since the military's 2013 ouster in Cairo of Islamist president Mohamed Morsi, personally backed by Erdogan.
A Turkish official confirmed to AFP the handshake in Doha during the opening ceremony for the World Cup.
Turkey has moved to warm ties with some regional foes including Egypt since last year but Cairo has not shown the same level of enthusiasm for a rapprochement as Ankara has.
The picture, however, showed a sincere handshake between the two leaders.
The Egyptian presidency did not comment on the meeting.
Erdogan hinted that Turkey could revisit strained ties with regional countries including Syria and Egypt after next year's election.
"We can reconsider ties with the countries that we have problems with," he was quoted as saying by Turkish media this week aboard his plane returning from a G20 summit in Indonesia.
"We can even start from scratch especially after the June election," he said.
After the 2011 Arab Spring uprisings in several Middle Eastern countries, Istanbul became a refuge for Islamist opposition activists, especially for Egyptians linked to Morsi's outlawed Muslim Brotherhood.
Last year, Erdogan's government demanded popular Egyptian exiled talk show hosts, such as Moataz Matar and Mohamed Nasser, tone down their criticism of Egypt's leader.
At massive rallies in past years, Erdogan has frequently raised a four-finger salute seen as a tribute to hundreds of Muslim Brotherhood supporters killed by security forces in Cairo following Morsi's ouster.