The Turkish government has faced a deadly coup attempt from elements in the nation's military. Responding to the unrest, foreign leaders condemned the violence and publicly supported Erdogan's administration.
With tanks still on the streets of Ankara and Istanbul on Saturday morning, governments around the world decried the violence and urged restraint.
Steffen Seibert, spokesman for German Chancellor Angela Merkel, said that Berlin was supporting the "elected government" in Turkey.
"The democratic order in Turkey needs to be respected," he tweeted. "Everything must be done to protect human lives."
The White House also issued a statement saying that Barack Obama and Secretary of State John Kerry discussed the situation in Turkey, and were urging all parties to "show restraint, and avoid any violence or bloodshed." Kerry said he spoke with Foreign Minister Mevlut Cavusoglu to relay Washington's "absolute support for Turkey's democratically elected, civilian government and democratic institutions."
Elements within the Turkish military attempted to seize control of government and media institutions
The US State Department called on American citizens in Turkey to "shelter in place and stay indoors."
Addressing supporters outside Istanbul Ataturk Airport on Saturday morning, Erdogan told the crowd assembled there: "They have pointed the people's guns against the people. The president, whom 52 percent of the people brought to power, is in charge. They won't succeed as long as we stand against them by risking everything."
Erdogan's first appearance after the attempted coup came through a FaceTime app on an Apple iPhone, held up to a TV camera by a news presenter:
Speaking on live television, Erdogan accused the followers of the US-based cleric Fethullah Gulen of organizing the coup attempt. The Turkish president has repeatedly claimed "parallel structures" loyal to his rival Gulen were trying to destabilize the country and overthrow the government.
Gulen himself, however, also spoke out against the putsch, saying that "governments should be won through a process of free and fair elections, not force."
Russia "deeply concerned"
"We call for a swift return to Turkey's constitutional order," EU top diplomat Federica Mogherini said from a summit in Mongolia. "We continue to follow closely the developments and to coordinate with the 28 EU Member States." In a separate statement, European Council President Donald Tusk and EU Commission chief Jean-Claude Juncker urged a "swift return to normal" in Turkey.
Kremlin spokesman Dmitry Peskov told reporters that Moscow is "deeply concerned" about the situation, and that President Vladimir Putin being kept up to date by the foreign ministry and intelligence services. Previously, Foreign Minister Sergey Lavrov called on Turkey to avoid "bloodshed."
Iranian Foreign Minister Javad Zarif also stated that stability, democracy and safety of civilians were "paramount."
"Military interference in the affairs of any state is unacceptable," UN Secretary-General Ban Ki-moon said, also calling for civilian rule to be maintained.
NATO Secretary-General Jens Stoltenberg also backed Erdogan's government and called for "calm and restraint," adding that Turkey was "a valued NATO ally."
In Syria, hundreds of regime supporters took to the streets to celebrate the news of an attempted coup. The Bashar al-Assad regime views Erdogan as one of the main foes of the Damascus government. Assad also accuses Ankara of supporting jihadist groups in Syria.