Key regional powers Iran and Israel, which have both had strained relationships with Erdogan's government, condemned the putsch that began late on Friday night.
Iranian Foreign Minister Mohammad Javad Zarif hailed the Turkish people's "defence of democracy & their elected government" which he said "proves that coups have no place in our region and are doomed to fail."
"Deeply concerned about the crisis in Turkey," Zarif tweeted late on Friday.
"Stability, democracy & safety of Turkish people are paramount. Unity & prudence are imperative."
Israel, which last month approved a deal to restore ties with Ankara that were frozen after a deadly Israeli raid on a Gaza-bound Turkish ship in 2010, also condemned the coup attempt.
"Israel respects the democratic process in Turkey and looks forward to the continuation of the reconciliation process between Turkey and Israel," said foreign ministry spokesman Emmanuel Nahshon.
Iran's regional arch foe Saudi Arabia also welcomed Erdogan retaking control.
- 'Victory of democracy' -
A Saudi foreign ministry official said in a statement that the kingdom "had followed with much concern developments in brotherly Turkey" and "welcomes the return of the situation to normal under the leadership of President Recep Tayyip Erdogan and his elected government."
Gas-rich Qatar, which is close to Turkey, was quick to condemn the coup attempt and congratulate Erdogan.
In a telephone call with the Turkish leader, Qatari emir Sheikh Tamim bin Hamad al-Thani "congratulated (Erdogan) on the support of the people of Turkey on his rule against the failed military coup," the official QNA news agency reported.
Signup to our newsletter and follow us on Facebook and Twitter!
Gas-rich Qatar is Erdogan's closest Gulf ally, sharing his sympathies for the Muslim Brotherhood that formerly ruled Egypt and which is outlawed in other Gulf Arab states.
Kuwait's Emir Sheikh Sabah al-Ahmad Al-Sabah congratulated Erdogan on "the success of legitimacy and the victory of democracy the will of the friendly Turkish people" who have been spared "much suffering."
Bahrain made a similar statement rejecting any attempt to undermine "constitutional legitimacy under the leadership" of Erdogan and his government and stability in Turkey.
Oman has so far made no comment on the events in Turkey while the United Arab Emirates only advised its citizens there to stay off the streets.
Gaza's Islamist Hamas rulers, who have friendly ties with Qatar as well as Turkey's ruling Islamic-rooted AKP party "condemned the failed coup attempt" and "congratulated the people and the Turkish leadership for successfully protecting democracy."
Turkey has recently obtained several compromises from Israel over Gaza including authorisation for Ankara to build a hospital.
On Saturday, activists -– notably those linked to Hamas -– called for demonstrations in solidarity with the Turkish government.
Erdogan called on his supporters to remain vigilant, warning of a fresh flare-up of violence even as his forces regained control.
In Khartoum, President Omar al-Bashir condemned "the attempted coup in Turkey and the disturbance of security and stability in the country."
"The government of Sudan and its people stand beside President Erdogan and the people of Turkey to ensure security and stability in Turkey," the presidency statement added.
Turkish Prime Minister Binali Yildirim said Saturday 161 people -- not including the putschists -- were killed in the coup attempt, with 2,839 soldiers detained on suspicion of involvement.
Turkey's acting army chief had earlier said 104 putschists had been killed.