The similarities between the economies of Egypt and Sudan are another reason for the Sisi government's anxiety about the unrest across the border. The protests in Sudan were sparked by a spike in food prices and gas shortages after the devaluation of the Sudanese currency in October and the lifting of wheat and fuel subsidies that led to a surge in inflation . What began Dec. 19 as scattered protests to decry the painful austerity measures quickly spiraled into a full-blown revolt calling for nothing short of Bashir's resignation. Egyptians are also grappling with high inflation; also, there is growing discontent in the country over the increased prices of basic commodities and services following the government's devaluation of the Egyptian pound by 48% in late 2016 and successive reductions in fuel and electricity subsidies since. The measures are part of the government's economic reform program to meet International Monetary Fund demands for a $12 billion loan to help shore up the economy , battered by the political unrest that followed the 2011 uprising. Further hikes in prices are expected when the government eliminates fuel subsidies , a move expected in mid-June, according to local media reports.

Cairo's backing for Bashir had largely stemmed from the need to protect its own vital security interests amid fears that the instability in Sudan could spill over the border into Egypt. Egypt already faces a major security challenge on its western border with Libya and has had to reinforce its troops there to counter infiltration attempts by jihadis and weapons smuggling. Beefing up security along the southern border with Sudan at a time when the Egyptian military is engaged in counterterrorism operations in the Sinai Peninsula would spread the troops too thin.

For nearly four months, Cairo had closely monitored the political turmoil in neighboring Sudan. The street protests calling for Bashir to step down had unnerved the government of President Abdel Fattah al-Sisi. But the uneasiness caused by the revolt on Egypt's southern border was not because Bashir was a close friend and ally — there was no love lost between Sisi and the toppled Islamist president. The relationship between Egypt and Sudan had often been tense: A longstanding dispute over the Halayeb Triangle (border territory administered by Egypt and claimed by Sudan) and conflicting views on the Grand Ethiopian Renaissance Dam, currently under construction, are bones of contention that cast a shadow over bilateral ties. While Sudan has expressed its support for the building of the dam, Egypt sees it as an existential threat, fearing a reduction in its own water supply once the project is completed.

The statement surprised some analysts as Egypt had appeared to support the embattled Sudanese president in the months leading up to his overthrow.

In a shift from recent policy, Cairo backed the removal of longtime Sudanese President Omar al-Bashir on April 11. Shortly after Bashir's ouster by the military, the Egyptian Foreign Ministry released a statement expressing support for the "Sudanese people's choice and will" and calling on the international community to "help Sudan to have a peaceful transition."

Anger is also mounting in Egypt over "the unprecedented human rights violations" and political repression by the state. Thousands of political opponents — the majority of them Muslim Brotherhood members and supporters — have been imprisoned in a sweeping crackdown on dissent that has continued since the July 2013 overthrow of President Mohammed Morsi of the Brotherhood. Scores of liberal activists, rights defenders and journalists are also behind bars on what rights groups say are trumped-up charges.

Bashir's overthrow came as Egypt prepares to hold a national referendum this month on controversial constitutional amendments that would allow Sisi to remain in power beyond his allotted two terms (which end in 2022). The proposed changes would also tighten Sisi's grip over the courts by empowering him to appoint judges for Egypt's highest courts and select the prosecutor general. They would also restore the military as the ultimate authority in the country. Although rights groups, liberal political parties and some pro-democracy activists have fiercely criticized the amendments, they are widely expected to become law as the upcoming referendum offers little guarantee of being free and fair.

Believing that the outcome of the poll is a fait accompli and unable to protest because of a "restrictive" 2013 law banning demonstrations, Egyptian activists are left with little option but to vent their frustrations on social media. Many of them have followed the recent developments in Sudan and Algeria with bated breath — and, perhaps, a tinge of envy. Sharing videos of the protests calling for regime change in Sudan, the activists expressed their admiration for and solidarity with the peaceful Sudanese protesters. When the news broke of Bashir's ouster April 11, there was an outpouring of joy on social media networks in Egypt.

"Congratulations to the people of Sudan, the most refined and knowledgeable people in the Arab world. Those who work hard reap the fruits of their success," tweeted Mamdouh Hamza, an Egyptian political activist who was briefly detained in February on the charge of spreading false news.

A photograph of the six Arab toppled dictators (including both Sudan's Bashir and Algeria's Bouteflika) was widely shared on social media networks with some asking, "Who is next?"

Scenes of Sudanese protesters celebrating the fall of Bashir reminded Egyptian pro-democracy activists of their own short-lived victory in February 2011 when Mubarak had stepped down after 18 days of protests. But the images also served as painful reminders of the mistakes made by the young activists in Tahrir Square, prompting some of them to send warning messages to the Sudanese protesters against leaving public squares before their demands are met.

"Today may be the real start of the Sudanese struggle. The regime is not just one man, it's a network of interests that will fight hard to maintain the status quo even if it looks slightly different," warned Wael Eskandar, an Egyptian blogger who participated in the 2011 uprising against Mubarak.

Rights advocates such as Aida Seif, one of the founders of the Cairo-based Nadeem Center for Rehabilitation of Victims of Violence and Torture, also exhorted the Sudanese activists to stand their ground. She rebuffed an April 12 statement by the interim military council reassuring protesters that "the military has no interest in assuming power" and that the next government would be a civilian one. "Same old!" she tweeted, apparently in reference to Sisi's reneging on his promise not to run for president.

Others such as Hassan Nafaa, a professor of political science at Cairo University, sounded a more optimistic note.

"Arabs will no longer accept the replacement of one dictator with another," he wrote, but also cautioned, "Unless power is handed over to a transitional civilian government, the result will be an endless cycle of repressive regimes. I believe the second wave of the Arab Spring is more mature and determined."

His remarks came shortly after Sudanese Defense Minister Awad Mohamed Ahmed Ibn Auf announced in a televised statement that Bashir had been arrested and that a transitional military council would rule the country for two years before any democratic elections can take place. The plan met with rejection from protesters, who vowed to stay in the streets until the military hands over power to a civilian government.

"Either victory or Egypt!" chanted the protesters in reference to the counter-revolution that thwarted the movement for change in Egypt. The slogan ruffled the feathers of some Egyptians who decried it as an "uncalled-for jab" and urged the Sudanese to "respect our feelings." Others lamented that Egyptians who had inspired others with their courage and resilience eight years ago "have become the laughingstock of the world." Others expressed surprise that the protesters in Sudan had mentioned the Egyptian scenario rather than the situations in Syria or Iraq, which are wracked by years of civil war and conflict.

But Amro Ali, a writer and researcher, encouraged the Sudanese to draw valuable lessons from the Egyptian revolution.

"If it takes Egypt's tragedy to be a lesson for the Sudanese to succeed, then the lesson has not been in vain," he said.