Turkey does not make friends with those who sentence their democratically-elected president to death, Turkish Prime Minister Ahmet Davutoglu said Anadolu Agence reported.
Addressing an election rally of the ruling Justice and Development, or AK Party, in Istanbul's Maltepe Square, Davutoglu called the people who imposed the death penalty on Egypt's first elected President Mohamed Morsi as "modern [day] pharaohs."
"We never make friends with those who sentence a democratically-elected president to death," he said.
"Morsi and his friends will always be remembered in the next decades, but those who imposed the death penalty on him will be thrown into the trash bin of history," he said.
Davutoglu added that Turkey did not ally itself with Egypt's "coup plotters who wish to execute the elected president" or with Israel who "step inside the Al-Aqsa Mosque with military boots."
The premier's comments come in the backdrop of remarks made by the Turkish opposition Republican People's Party leader, Kemal Kilicdaroglu, who recently asked why Turkey had no ambassadors in Syria, Egypt and Israel.
On Saturday, Davutoglu warned Egypt that it was repeating a disdainful period of history that Turkey itself witnessed 55 years ago, when coup plotters executed an elected leader.
He was referring to Turkey's 1960 military coup that saw the then Turkish premier, Adnan Menderes, first jailed and then made to stand on trial before being executed along with two ministers, Hasan Polatkan and Fatin Rustu Zorlu.
Davutoglu had pledged that no president or prime minister would ever again be sent to the gallows in Turkey.
Turkish President Recep Tayyip Erdogan termed the Egyptian court's verdict a capital punishment against democracy Saturday.
Erdogan had also called on the Western world to take a stance against the Cairo court's decision and criticized their silence over the issue.
An Egyptian court Saturday referred 122 out of 166 defendants, including Morsi to the country's grand mufti to consider possible death sentences against them over charges of jailbreak and espionage charges.
Morsi's family did not attend Saturday's trial session, citing "their rejection of the legitimacy of the trial."
He is the first president to be referred to the country's grand mufti in Egypt's history. The opinion of the mufti is non-binding, but Egyptian law makes it necessary for judges to seek a religious point of view on any death sentence.
Last month, Morsi and 12 codefendants were sentenced to 20 years in prison each for allegedly mobilizing supporters to "intimidate, detain and torture" dozens of anti-Morsi protesters during clashes outside eastern Cairo's Ittihadiya presidential palace in December 2012.
Morsi currently faces multiple criminal trials on charges that include espionage and "insulting the judiciary," charges he says are politically motivated.
Since Morsi's ouster in July 2013, Egyptian security forces have launched a relentless crackdown on dissent that has targeted both Islamists and secularists, leaving hundreds dead and thousands behind bars.
Relations between Cairo and Ankara soured following the ouster of Morsi. In November 2013, Turkey and Egypt reciprocally downgraded their diplomatic relations to the level of charge d'affaires and recalled their ambassadors from both capitals.
Turkey has been among the few countries to describe the 2013 seizure of power by the Egyptian army, headed at the time by Abdel-Fattah al-Sisi, as a "military coup".