Turkey has reiterated calls for the release of deposed Egyptian president Mohamed Morsi, saying it would help promote rapprochement between the authorities and Islamists.
The statement on Tuesday came after the ousted leader appeared in court on Monday, his first public appearance since his removal by the army in July following massive protests against him.
"We believe the release of all political prisoners, including elected president Morsi, will contribute significantly to the emergence and sound implementation of the dialogue and reconciliation process in that country," read a statement carried on the official website of the Turkish foreign ministry.
Mohamed Morsi appeared in court on Monday for the first day of his trial on charges of inciting the murder protesters in December 2012.
He had been held at an undisclosed location since his ouster, but authorities said on Monday he had been transferred to Borg Al-Arab prison near Egypt's second city of Alexandria.
"Turkey has always stood by the principle of legitimacy and supported without any discrimination governments that are based on legitimacy and reflect the will of the people," added the statement.
Morsi's overthrow has strained relations between Cairo and Ankara. A deadly crackdown on Islamists on 14 August prompted the two countries to recall their respective ambassadors for consultations. The Turkish envoy retuned to Cairo early in September, but Egypt says its ambassador will not return unless interference by Turkey ceases.
Tensions heightened further when both countries cancelled planned joint naval exercises scheduled for October.
Turkey has urged an inclusive political process to secure peace in Egypt and stability in the Middle East.
"In this context, Turkey considers it indispensable to take steps on the basis of democratic and constitutional principles to enable an inclusive political process in which all parties agree to function. This will ensure not only peace and serenity in friendly and brotherly Egypt, but also lasting stability in our region."
Turkey's Islamic-rooted Justice and Development Party (AKP) government struck up a close alliance with Morsi, a senior member of the Muslim Brotherhood, when he was elected in Egypt's first free elections in June 2012.
Turkish Prime Minister Recep Tayyip Erdogan, one of the fiercest critics of Morsi's removal, has repeatedly called for his release and severely condemned recent violence.
Ankara's statements have infuriated Egypt's interim rulers who have accused the government of "clear interference" in the country's domestic affairs.
Hundreds have been killed in Egypt in deadly street fights pitting Islamists against security forces and civilian opponents over the past three months, plunging the country into turmoil.