ISTANBUL – An attempted military coup by a faction of army was repelled in Turkey on Friday night when hundreds of thousands of people took out to streets on the call of President Recep Tayyip Erdogan.

Erdogan was holidaying on the coast while the coup was launched and information about his exact location remained unclear during the whole development.

Related: Turkey chief of staff Hulusi Akar rescued: TV

The uncertain situation continued in the two major cities of the country, Ankara and Istanbul, for hours and ultimately resulted in the emergence of Erdogan on Istanbul’s Ataturk Airport, after the government institutions of Turkey were retaken by pro-Erdogan forces.

Related: Fethullah Gulen denies involvement in coup attempt

During the coup-related events, at least 50 people were killed and scores others critically injured. At least two major blasts also struck the building of the Turkish Parliament, which caused serious damages. The transmission of the state-run TV was also controlled by the coup troops.

Related: 50 Turkish soldiers involved in coup surrender in Istanbul

A Turkish military commander said that pro-Erdogan forces also used fighter jets to shot down a helicopter used by the coup plotters over the city of Ankara.

Later, addressing the nation, President Erdogan said a conspiracy was hatched against the country and the democracy. He said it was a conspiracy against unity and solidarity of the country.

He described the attempted coup as high treason and said the ring-leader, who plotted all this, will have to pay the price in front of the nation.

Media reports said that arrests of pro-coup officers were already under way, and it would go higher up the ranks, culminating in the cleansing of the military in the coming days.

Meanwhile, there have been many international condemnations of the attempted coup. The global community categorically dismissed the call of the pro-coup military group.

President Barack Obama has urged all parties in Turkey to support the democratically elected government of Turkey, show restraint and avoid violence and bloodshed.

European leaders said that they fully support the Turkish Government and called for a swift return to constitutional order in the country.

Related:Turkey coup: 60 killed, scores injured during clashes in Ankara

A joint statement by the president of the European Council, European Commission and EU High Representative said the EU fully supports the democratically elected government and the rule of law.

In a statement, spokesperson of the government of Pakistan said that we support the will of the people reflected in the democratic system and the democratically elected leadership of Turkey.

He said Pakistan condemns the attempt to undermine democracy and the rule of law in Turkey. The spokesperson said the Pakistani nation hopes that peace and normalcy will be restored in Turkey.

Defence Minister Khawaja Muhammad Asif has said Turkish people have defeated the dark forces and defended their right to rule.

In a twitter message, he said Turkish people have come out in streets challenging attempt to subvert democracy and Marshal Law is not the rule of law. The Minister said Muslim countries need democracy to overcome their challenges.

Online circulating videos and pictures showed the chaotic events of the coup attempt: