Upon hearing Mazin al-Belkhi’s Syrian accent, a Cairo taxi driver swerved to a halt last week and kicked him out of the cab. Last month, the hospital where Majda and other Syrians work cut their salaries by more than half.

Syrian refugees, who number more than 100,000 in Egypt alone, say they were welcomed here less than a year ago. Newly elected Islamist President Mohamed Morsi and his Muslim Brotherhood allies were sympathetic to Syria’s predominantly Sunni rebels and the battle to topple Syria’s repressive autocrat.

But just as Egypt’s Islamists have become the enemies of the nation in the aftermath of a coup that ousted Morsi on July 3, many Egyptians have also turned against the Syrian rebels and refugees Morsi had so vocally supported.

Nowhere has the backlash to the Arab Spring been as quick and complete as it has been in Egypt this summer. In two months, the Arab world’s largest country, and the second to revolt in the 2011 uprisings that toppled dictators across North Africa, transitioned from a faltering, post-uprising democracy back into the clutches of a military-backed, unelected government.

Longtime autocrat Hosni Mubarak, who was toppled in 2011, has been released from jail, pending another trial. And Egypt’s new interim government has led a devastating crackdown against Mubarak’s — and Syrian President Bashar al-Assad’s — old foes in the Muslim Brotherhood, killing hundreds and imprisoning many more, including Morsi.

As of Sept. 4, lawmakers appear to be tentatively dividing into four camps over military action in Syria.

For the Syrians who fled their own disastrous revolution-turned-civil-war to a nation that had, at least initially, seemed like an Arab Spring success, the sudden shift is all the more jolting.

“They used to treat us with respect. Now they treat us like cattle,” said Bilal, 45, who opened a cheese shop last year in a Syrian-packed district on the outskirts of Cairo after abandoning his sweets shop in Damascus, the Syrian capital.

Bilal, like most other Syrians interviewed, provided only his first name for fear of becoming a target in a country that has proved increasingly hostile in recent weeks.

The rebel Free Syrian Army, which Egyptian media has tied to the Brotherhood, is no longer seen as a friend to the Egyptian people, Bilal said. “People now look at us and say, ‘You are the traitors. You are the ones doing the killing in Syria.’ ”

Syrian refugees say they are insulted and taunted on the streets, charged double for commodities and services, increasingly mugged and robbed, and are harassed by police. Many said they hope to leave.

Linked with Morsi backers

Two weeks before the coup, Morsi delivered a fiery condemnation of Assad and vowed to support the Syrian revolution — words that proved unpopular at home.

Since Morsi’s ouster, Egyptian television channels have reported that pro-Morsi sit-ins have been packed with Syrians. Some outlets attributed both the Syrian uprising and the rise of Morsi in Egypt to an American plot to destabilize the region. Government officials said the Brotherhood was “exploiting Syrian refugee youth” in its struggle against “the Egyptian people.”

Syrian activists dismissed the claims but said some of the charities that provided housing to the poorest Syrians forced them to attend the sit-ins, further inflaming local tensions.

Morsi’s government had offered sanctuary to Syrian opposition members. Now those activists say they fear that Egypt’s new government will not protect them from Assad’s regime, which has monitored, harassed and, in some cases, allegedly tried to assassinate opposition members living abroad.

The state has also shut its doors to more Syrian refugees, activists say.

Haitham Maleh said he was stopped at the Cairo airport on his way back from a Syrian opposition conference in Turkey last month. Egyptian security officials told him, along with other arriving Syrians, that he would not be allowed back into the country where he had sought refuge from Assad regime more than two years ago. Maleh, a prominent Syrian opposition leader and the head of the Syrian Opposition Coalition’s legal committee, was lucky: Saudi diplomats intervened on his behalf. The others, he said, were deported.

As Syrian students and parents prepared for the start of the school year, they were told that Egypt’s public schools were full, Syrian activists and refugees said. Dozens of Syrians were detained when police moved to imprison Morsi’s Islamist supporters. Maleh believes that at least 100 were deported.

“Now you have to get a visa and security clearance to come into Egypt,” he said. “We look back — even at the time of Mubarak, we could come in without all of these papers.”

‘We feel like we’re prisoners’

But those who want to leave have few options. Lebanon, Turkey and Jordan are also overflowing with Syrian refugees and have increasingly sought to stem the tide. Some refugees in Egypt spoke of moving to impoverished, unstable Yemen — one of the few Arab countries where they are still welcome.

“They hear us talk, and you can see their faces change when they hear the Syrian dialect,” said Mohamed, the former owner of a furniture shop in war-ravaged Aleppo, of his day-to-day experience in Cairo. Mohamed arrived here with his wife and five children six months ago. When he went to register his son for school last month, “the principal said that Syrians are not welcome,” he said.

The U.N. refugee agency, ­UNHCR, has been overburdened by the Syrian conflict, which has provoked what U.N. officials have called the worst refugee crisis in 20 years. Less than a third of the 300,000 Syrians the Egyptian government estimates are in the country are registered with the UNHCR to receive benefits.

Maleh said that is because Syrians received enough support from charities and ordinary Egyptians in the early months of the war.

“The refugees never felt the need to go to the UNHCR to register as refugees,” he said. “A lot of charity organizations have helped the Syrians here. They have lived in apartments, not in camps.”

But, fearing deportation, many are now rushing to register.

“We don’t get any aid here as refugees. But we feel like we’re prisoners,” said Soad Khobia, an activist and mother of two who fled the Syrian city of Douma in March. Khobia has tried to provide outreach for refugees in Cairo, while staying active with the opposition abroad.

She was to attend an opposition conference in Turkey next week. But when she tried to finish her exit paperwork a few days ago, she realized she wouldn’t be going anywhere.

“The woman said, ‘Syrians who want to leave can leave,’ ” Khobia said of the bureaucrat who looked over her paperwork, who added, “ ‘but they can’t come back.’ ”

Sharaf al-Hourani in Cairo contributed to this report.