Gilgamesh Nabeel

Special for USA TODAY

ISTANBUL — After the failed weekend coup, some of Turkish President Recep Erdogan's most loyal backers aren’t Turks — they're grateful Syrians who flooded across this country’s southern border to escape civil war.

Turkey provides them a safe haven, plus they are envious that Turkey is a democracy — at least so far — in contrast to the dictatorial regime of Syrian President Bashar Assad.

“I raise my hat to them (Erdogan’s government forces) for their brave act saving their country,” said Yara Shikhani, 27, a Syrian refugee studying medicine in Malatya in southeastern Turkey. “God knows, if the government fell, what could have happened. It might have turned into another Syria."

On Tuesday, the Turkish government expanded its crackdown on those it alleges are tied to the coup attempt, firing nearly 24,000 teachers and Interior Ministry employees and demanding the resignations of another 1,577 university deans, the Associated Press reported. The government also detained 9,000 people, including security personnel, judges, prosecutors and religious figures.

State media: Turkey sends formal request for extradition of Gulen from U.S.

Shikhani and other Syrians cited how Erdogan recently proposed a path to citizenship for the 2.7 million Syrian refugees that the United Nations estimates are living in Turkey. Those refugees have swarmed across the Turkish-Syrian frontier since the Syrian civil war erupted five years ago. Many continued to Europe, but Ankara and the European Union in March sealed a deal to relocate Syrians stuck in Greece back to Turkey.

"As a Syrian citizen, I see Erdogan as a person who opened the doors — in all fields — to continue our lives, while our Arab brothers close the doors in front of us,” Shikhani said.

But some Turkish citizens fear that Erdogan will use the coup attempt, which his government foiled early Saturday, as a pretext to further consolidate his power and continue suppressing democratic rights, efforts that already have drawn criticism from the United States and other governments.

Turkey blames U.S. for coup attempt

Turkey’s refugee agreement with the EU rested on the assumption that Turkey was a safe country where the basic rights of refugees would be protected. Human rights groups have raised questions about whether Turkey can uphold those rights given Erodgan’s crackdown on free speech, journalists, political opponents and the country's Kurdish minority.

"The coup showed the necessity for more international support for democracy and rule of law in Turkey,” said Murat Somer, professor of political science and international relations at Koc University in Istanbul. “Of course it will raise questions about the status of Turkey as a safe country."

Few Syrians echoed those concerns.

Many Syrians attended the pro-government rallies on Sunday throughout the country, waving flags alongside Turks with their banners.

Mohammed Ibrahim, 25, an unemployed refugee at a demonstration in Istanbul's Taksim Square, said Syria's Assad came to power because his father staged a military coup in the early 1960s. Now, Syria’s army continues to prop up his regime. Ibrahim said Turks should be proud that their elected leaders overcame the army officers who staged the failed weekend coup.

“This is what we couldn't accomplish in Syria," he said.

Purge of Turkey coup supporters intensifies

Erdogan has long been one of Assad's adversaries. Turkey hosts Syrian rebel leaders in exile and conducts airstrikes against the Islamic State as part of the U.S.-led coalition in Syria, though critics have said Erdogan has used the opportunity to attack Kurds who seek independence for Kurdish regions of eastern Turkey.

The Free Syrian Army, a rebel group seeking to topple Assad, issued a statement offering "full solidarity" with Turkey's elected government. “We stand with the Turkish people who went out in the streets to defend its achievements,” the statement said.

Hussein Issa, 52, a Syrian refugee working as a barber in Istanbul, said he was happy to take to the streets to show his support for Erodgan.

"It represents the people’s victory,” Issa said. “The government is democratic and has the people's support. Turkish people love their country and went out to save their democracy. As a Syrian citizen, Turkey is now home for us, even if it is a temporary one, and we have to save it."

Contributing: Victor Kotsev