CAIRO — Deploying gangs of armed masked men and riot police, Egyptian security forces clamped down on central parts of Cairo on Friday, preventing anti-government protesters from mounting a second major challenge to the regime in one week, at least for now.

Security forces blocked more than a dozen roads leading to Tahrir Square, the epicenter of Egypt’s 2011 Arab Spring revolts that toppled longtime autocrat Hosni Mubarak. The streets were deserted, almost ghostly, with only security forces present, making the area impenetrable like a fortress.

Some metro stations in downtown Cairo were also closed. At checkpoints, white-uniformed police officers randomly stopped people, especially those on motorcycles, demanding to see their identity documents and even the contents of their phones and social media accounts.

As of Friday night, there were reports on social media of two short-lived protests: one in an area of Cairo and the other in another southern city. Neither appeared to be of any substantial size.

Even as the government stifled freedoms of speech, movement and assembly for many Egyptians, it brought in tens of thousands from around the country to a nationalist rally in Cairo’s Nasr City enclave. The pro-government demonstration was held a few minutes’ walk from Rabaa Square, where Egyptian security forces massacred hundreds of anti-government protesters in 2013.

By nightfall, the rally had become a massive concert, with video screens and flashing lights in support of Egypt’s authoritarian President Abdel Fatah al-Sissi.

“Sissi, Sissi, Sissi,” the crowds chanted, carrying Egyptian flags and posters of the president.

 Throughout the week, the government had been preparing for this day, widening its biggest security crackdown in six years. By Friday, the Arab world’s most populous nation was already more tense than at any moment since Sissi took office five years ago.

Last Friday, several hundred protesters took to the streets in demonstrations in several cities that amounted to the biggest challenge to Sissi’s rule. A once-obscure whistleblower, Mohamed Ali, whose videos alleging high-level corruption have struck a chord with frustrated Egyptians, had urged millions to protest on Friday against Sissi.

 “We are going to protest because we are on the right side, the good side,” said Mohamed Ali Shawky, 19, a university student, Friday morning. “We are doing this because we believe in the justice of our cause. That is what is making us stronger even when we are scared to death. It gives us faith, even when the regime has weapons and soldiers.”

But by Friday night, the much-anticipated demonstrations did not arise. Ali in a video Thursday night urged Egyptians to avoid Tahrir Square and protest in other parts of Cairo, but security forces were present citywide.

By early Friday evening, Shawky was frustrated. He was trying to meet up with fellow protesters in the enclave of Boulak or in areas nearby. “All the places we could gather at in Boulak or elsewhere are under the grip of security,” Shawky said. “We can’t even meet up.”

The Egyptian security forces had beefed up their presence in Cairo, a show of intimidation unlike anything seen in years. Armored vehicles and riot police stood in front of mosques and government buildings. In neighborhoods where residents had protested in the past, plainclothes security agents carrying walkie-talkies and handguns were visible, searching and questioning people.

In Cairo’s Ramses Square, a pickup truck and mini buses carried dozens of burly, heavily armed men wearing black balaclava masks. They followed a convoy of police vehicles, which included large armored vans, traveling in the direction of an area known for dissent.

In the run-up to Friday, the government arrested more than 2,000 people, according to the Egyptian Center for Economic and Social Rights, and the number is likely to rise. Many were arbitrarily arrested in random sweeps, said human rights lawyers 

 They included opposition politicians, journalists and activists, along with at least seven foreigners, as the Sissi government attempts to portray the emerging dissent as orchestrated by foreign political forces. Sissi, in a meeting with President Trump this week at the U.N. General Assembly in New York, blamed the protests on “political Islamic groups.”

The security crackdown, which included restricting various Internet services and websites, was described Friday by Human Rights Watch as possibly the biggest since the aftermath of the 2013 ouster of Mohamed Morsi, Egypt’s first democratically elected president who was toppled in a military coup engineered by Sissi. 

The watchdog group’s Middle East and North Africa director, Sarah Leah Whitson, called upon Egypt’s Western allies to suspend military assistance, saying the only way to bring stability in the country “is a government that respects the rights and freedoms of the Egyptian people.”

The suppression of Friday’s protests followed a statement by two U.S. congressmen on the House Foreign Affairs Committee — Reps. Eliot L. Engel (D-N.Y.) and Michael McCaul (R-Tex.) — saying that “Egyptians have the right to protest peacefully and to exercise that right without fear of retribution.” They also called for the release of all those jailed in the past week.

“The United States supports the right of Egyptians to express their political views freely, the right to associate, the right to political protest, peaceful political protest. We’re following developments on the ground,” the State Department said in a statement Friday.

“We understand there have been a number of arrests, and we call upon the Government of Egypt to protect citizens’ ability to exercise these rights peaceably,” the State Department said.

The changing tenor against Sissi on Egypt’s streets is dividing the nation. Many Egyptians, especially in upper-middle-class and affluent areas, remember how the 2011 revolts led to political and economic chaos, shattering the nation’s all-important tourism industry. After last Friday’s protests, Egypt’s stock markets tumbled, triggering more apprehension.

Such fears have also been stoked by the government. It has mounted its own campaign in state-run newspapers and television, as well as on social media, to portray Sissi as honest and trustworthy. 

“I love President Sissi,” said Emad Saleh, 40, a dentist who came to Friday’s pro-Sissi rally. “I don’t want the country to become unstable again.”

 Since Sissi took office in 2014, his security forces have arrested tens of thousands of opponents and silenced even the mildest forms of dissent.

Under Sissi, the army has grown more powerful. It owns countless businesses and is widely seen by many Egyptians as corrupt.

 So when Ali, a disgruntled former government building contractor, began posting his videos online in early September from his self-exiled perch in Spain, millions across Egypt and the Arab world tuned in. The videos accuse Sissi and his generals of squandering millions in taxpayer funds to build villas, a hotel and palaces. That has angered millions of Egyptians who are suffering from rising prices and lowered state subsidies under Sissi, among other economic woes.

On Friday, the government took no chances, even arresting those it suspected could influence protesters. The detainees included Hazem Hosny, a political science professor and former elections spokesman for Sami Annan, a retired general who was arrested after he announced his candidacy to run against Sissi in a presidential election last year. Also taken into custody was Hassan Nafaa, a well-known journalist, and Khaled Dawoud, a former politician and journalist.

The Ministry of Endowments, which oversees the nation’s mosques, set the topic for mosque sermons on Friday to center on fighting rumors and the need to protect nations, in a clear rebuke of Ali’s videos.

Despite the crackdowns, there remains a sense of defiance among many Egyptians. Shawky, the student demonstrator, insisted that his real name be used, saying that he participated in last Friday’s protests as well because he was “fed up” with the “corruption, sickness, repression and murder.”

 He joined not solely because of Ali’s allegations, but because his videos “gave people the chance to regroup, and it . . . disclosed the corruption of this regime even more bluntly.”

 Most of his friends who took part in last Friday’s protests have been arrested, he said.

On Friday night, Shawky said he felt “oppressed and repressed” at being silenced.

“I feel like someone is unjustly taking away all my rights on all levels,” he said. “I feel like someone is holding a gun and is ready to shoot me dead or jail me in a second. I am utterly helpless and can’t even speak out.”