Hours after marching in a peaceful protest against the government late last month, Yassin Mohammed and his friends were lingering in the area in a district of the Egyptian capital when police descended on them, piled them into a minibus and took them to a police station. There, he said, he was blindfolded, handcuffed and beaten by security agents.

Now the 21-year-old Mohammed, released on bail, faces trial on charges of breaking a 2013 law that virtually bans any street demonstrations. He knows how heavy the penalty can be. Two years ago, he was sentenced to a total of 17 years in prison for joining protests — and he said he nearly committed suicide in his cell out of despair until a fellow inmate stopped him.

Mohammed is among those caught up in one of the biggest waves of arrests in the past two years in Egypt, a sweep that signals a fierce zero-tolerance stance by the government of President Abdel-Fattah el-Sissi over any sign of unrest.

The detentions were sparked by demonstrations against el-Sissi's decision last month to hand over two Red Sea islands to Saudi Arabia, which galvanized activists who had been largely silenced by previous crackdowns.

But activists have been startled by the scope of the arrests and how little it takes to bring severe charges, including accusations of seeking to overthrow the government or fomenting terrorism, over demonstrations that gathered only a few hundred people.

In just the last three weeks, human rights lawyers say nearly 1,300 were detained. Most of them have been released, but 277 have been formally charged and face trial, according to Mohammed Abdel-Aziz, a rights lawyer who has been tracking the arrests and is representing 20 of the detainees.

In recent speeches, el-Sissi has demanded that all criticism of the handover of the islands stop. He told a visiting U.S. congressional delegation that human rights issues in Egypt should be not approached from a "Western perspective" because of the challenges it faces, including a fight with an Islamic militant insurgency. El-Sissi also increasingly repeats that Egypt faces existential threats from "evil forces" or "evil people" conspiring to push the country into chaos and bloodshed like Syria or Iraq, though he has never explained what these forces are.

"It is like an old dam and the state is worried that allowing one crack to open will unleash a flood. The regime has no solution except suppression," said rights lawyer Gamal Eid.

Besides charges of violating the protest law, detainees often face other, broad and undefined charges, including spreading propaganda that harms security and hurting or disrupting national unity, security or social peace.

In recent days, police arrested five members of a satirical street performing group that produces videos on social media mocking el-Sissi. One of them, 19-year-old Ezzedeen Khaled, was detained Saturday and, though a court ordered his release on bail, was charged with inciting protests and posting videos containing foul language and insults directed at state institutions, according to his lawyer, Mahmoud Othman. The remaining four were arrested Monday and have been slapped with an even heavier charge of inciting terror attacks and protests.

A prominent rights lawyer, Malek Adly, who had filed a legal suit against the decision to hand the islands to the Saudis, was arrested last week and is under investigation for a range of allegations, including attempting to overthrow the government.

Another lawyer, Ahmed Abdullah, who had been advising the family of an Italian student kidnapped, tortured and killed in Egypt earlier this year, was arrested last month and has been charged with a long list of accusations including membership in a terror group and inciting protests.

On April 25, when activists called for protests against the islands' handover, police appeared to sweep up any young men who they believed intended to join in or were just in the area of planned demonstrations. Abdel-Aziz said that among the 20 defendants he represents are young men who were detained just for being at the wrong place at the wrong time or because anti-government material was found stored on their mobile phones. Others, he told The Associated Press, were picked up from downtown Cairo cafes, a favorite hangout for secular activists.

Mohammed told the AP he and his two friends were detained well after the day's marches were dispersed. They were still in the area looking for other friends who were missing.

Mohammad had previously been sentenced to a total of 17 years in prison in two separate cases for involvement in protests. A 15-year sentence handed down in one of the cases was reduced to three years in a retrial. He was then pardoned for that case last September, but his appeal against the remaining 2-year sentence in the second case was rejected last month. So he now faces that prison term and a trial on the new arrest.

"Nothing is really achieved by arresting me and others," he said. "It is the other side that is losing the love of the people when they arrest anyone they see."

Another of those arrested said he and several friends were detained six hours before the protests were to start on April 25, when they arrived in the area.

"We parked our car and started to walk looking for a place where we can eat breakfast. Five minutes later we were cordoned off by police and detained," he said, speaking on condition of anonymity to avoid further police retaliation. The 26-year-old said he was taken to a riot police base on the city's outskirts where he was interrogated and beaten. He was released on bail and faces charges that include seeking to overthrow the government.

El-Sissi and government officials have argued that strict measures are necessary at a time when Egypt is battling Islamic militants based in Sinai and trying to repair an economy gutted by years of turmoil since the 2011 ouster of autocrat Hosni Mubarak. Hundreds of policemen and soldiers have been killed by the militants — most recently eight policemen gunned down this week in an attack on the southern outskirts of Cairo.

Officials and the media also drum up vague fears of threats to the nation. Cairo airport officials often report the seizure of "spy" drones and secret cameras found hidden in the luggage of arriving foreigners, but there's never any further word on the "spies" or the nations behind them. Newspapers often speak of unidentified conspiracies and enemies. Hosts of political TV talk shows nightly engage in conspiracy theories complemented by incitement against government critics.

"Sadly, there is a significant level of social acceptance for these arrests because of the fear-mongering by el-Sissi and his loyalists in the media," Abdel-Aziz said.

El-Sissi still appears to enjoy widespread public backing, though it has shown some erosion. The Egypt-based polling agency Baseera, one of the few that conducts polls in the country, said its latest survey in April showed 79 percent approve of el-Sissi's performance, though that was down from 85 percent in November. The poll surveyed 1,541 people above the age of 18 with a margin of error of 3 percent.

Since leading the army's July 2013 ouster of Islamist President Mohammed Morsi, el-Sissi has overseen what is possibly Egypt's biggest ever crackdown on opposition. Initially, and most bloodily, the crackdown targeted Islamists, arresting thousands and killing hundreds who protested demanding Morsi's reinstatement. But security forces have also crushed the ranks of secular young activists.

Middle East analyst Michael W. Hanna of New York's Century Foundation does not see anyone or any group currently in Egypt that is capable of seriously challenging el-Sissi's rule.

"They are overreacting, of course, no question about it, in ways that are both strange and inappropriate," Hanna said.