Turkey has recalled its ambassador to Cairo as tensions with Egypt worsen dramatically following a bloody crackdown on supporters of the country ' s ousted president.

Egypt retaliated by recalling its envoy to Turkey, whose Prime Minister Recep Tayyip Erdogan has condemned what he called the " massacre " of peaceful protesters.

Erdogan, a supporter of former president Mohamed Morsi and his Muslim Brotherhood movement, has infuriated the interim government in Cairo by terming his ouster a military " coup ".

Nearly 600 people were killed in the violence that erupted on Wednesday when security forces moved in to break up pro - Morsi protest camps, the worst unrest in the country since the 2011 uprising that unseated Hosni Mubarak.

Erdogan, who heads Turkey ' s ruling Islamic - rooted Justice and Development Party(AKP), had forged a close alliance with Morsi since he was elected in the country ' s first free election in June 2012.

The Islamist leader was invited to the AKP ' s annual congress last September.

Turkish leaders hinted they would not break ties with the new leadership emerging in Egypt after the military uprising, despite their criticism of the army ' s actions.

Analysts, however, said the bloody crackdown on demonstrators was a breaking point for Turkey, which would make it very hard for Erdogan ' s government to reconcile with the military regime in Egypt.

Turkey invested both politically and financially in Egypt after Morsi ' s election, aiming to bolster Ankara ' s influence and show that Turkey was not the only country where Islam and democracy could coexist.

Last month, the Turkish leader cut short a holiday to hold an emergency meeting over the Egyptian crisis.

Erdogan said his country served as a " very important reference " to Egypt on why military uprisings must not be tolerated.