Turkey's prime minister is drawing parallels between the country's 1997 military coup that ousted an Islamist led government and forced early elections to Egypt's recent upheaval. Some analysts in Turkey believe how the country's Islamist movement reacted to the army intervention there may offer valuable lessons to Egypt.
Turkish Prime Minister Recep Tayyip Erdogan has been at the forefront of condemning the overthrow of Egyptian President Mohamed Morsi by the military.
In a speech this week, he again condemned the army's intervention, drawing on Turkey's history. Mr. Erdogan has firsthand experience, as he was ousted when serving as Istanbul mayor in the wake of legal crackdown in 1997 when the army forced from office Turkey's first Islamist Prime Minister Necmettin Erbakan.
Mustafa Akyol, author of the book "Islam Without Extreme," said how Turkey's Islamist movement reacted to the army's actions could help Egypt.
"The military orchestrated the whole thing; gave instruction to courts to open cases against Islamic politicians or opinion leaders," he said. "They took control of universities and fired or demoted professors who have relgious views. It was a sort of a witch hunt. Now the politicians who have been the target of this, including Erdogan, they took a lesson. They realized fierce fiery rhetoric, this threatening mood against secularists, this anti-western narrative, does not help them. So they took a lesson [and] they reformed themselves. They created the AKP with a whole different message."
Mr. Erdogan's AK Party swept to power in 2002 with a landslide victory. Since then, he has won two more general elections. The secret behind his initial success was the preparedness of the AKP to reach out to a wider cross-section of society. It stressed a commitment to follow pro-market economic policies and support the country's bid to join the European Union, according to Yuksel Tasgin, an assistant professor of politics at Istanbul's Marmara University.
"The first lesson that can be learned in the transition era [is] you should share power. AKP were able to convince liberal intellectuals for their democratization package, that they are really willing to join the European Union," said Tasgin.
The AK party's success also hinged on the fact that the electorate did not resort to violence or mass street protests in the wake of the army's intervention, according to author Mustafa Akyol.
"That's partly because the tradition of democracy is strong in Turkey. It goes back to 1950, the first free and fair elections," he said. "And the Islamic side knew that after every coup, there are free and fair elections, and generally the people that the military don't like win the elections. So they could see the future. They could understand that if they reform themselves, they have a better chance in the next election."
Supporters of ousted President Mohamed Mursi shout slogans as they attend weekly Friday prayers at Rabaa Adawiya square, where they are camping, in Cairo July 12, 2013
But where Turkey has become similar to Egypt is its weeks of anti-government protests.
Political columnist Kadri Gursel of the Turkish newspaper Milliyet says the protests, known as the Gezi Movement, were the result of Mr. Erdogan forgetting the lessons of the past by abandoning inclusive political policies.
"Since he deviated from this adopted reference of values, such as the EU perspective, secular democracy, now he is in collision with other segments of society. This is proven by the Gezi movement," he said.
But analysts say there is one lesson from Egypt that Mr. Erdogan is embracing. Like the Muslim Brotherhood, he claims he is a victim of an anti-democratic conspiracy, and he is promising a tough response to those behind it.