Many people could not decide which was more astonishing: the apparent avarice of the relatively affluent British rioters, or the uncanny familiarity of Mr. Cameron’s response. On Friday, he suggested restricting online social media like Twitter and Facebook, because they were bringing crowds of hooded young people together to loot and set fires, just as Mr. Mubarak once shut down the Internet in Egypt to stop the wave of protests.  “Mubarak didn’t come from an election box, but Mr. Cameron came from an election box,” Mr. Zackaria said.  Poverty and inequality helped fuel the revolution this winter in Egypt, where about half the population lives on the equivalent of less than $2 a day. But after the Egyptian police withdrew, there was only a night or two of looting in Cairo before people organized their own neighborhood brigades of volunteers to keep the peace.  In a torrent of Twitter postings, many Egyptians suggested the British should take a lesson.  “Dear tweeps in London,” an Egyptian activist, Ahmed Al Ish, wrote in a message to the British, “you can start forming neighborhood patrols to protect yourselves instead of panic on Twitter!!”  Another activist, Omar Barazi, wrote, “Egypt’s protesters are upholding democratic principles, while London’s rioters are holding-up plasma screens.”  Leaders around the region took the opportunity to enjoy the role reversal. In Libya, where Britain is among the leaders of a Western bombing campaign against Col. Muammar el-Qaddafi, the deputy foreign minister, Khalid Kaim, appeared to mimic Western oratory when he told the state news agency that Mr. Cameron had “lost his legitimacy and must go.”  “These demonstrations show that the British people reject this government, which is trying to impose itself through force,” said Mr. Kaim, who called for action by the United Nations Security Council.  In Iran, criticized by British leaders for the brutal repression of protesters after a disputed election two years ago, President Mahmoud Ahmadinejad sounded outraged at the conduct of the British police. “What kind of a treatment is this for the people who run out of patience because of poverty and discrimination?” he said to reporters, according to the Reuters news agency. “I advise them to correct their savage behavior.”  Some in the streets of Cairo also seemed to enjoy a chance to patronize the British.  “This is an uncivilized attitude, and we as the Egyptian people condemn it,” said Hany Bahana, 44, owner of an importing company who was attending a demonstration on Friday in Tahrir Square, the center of the protests that toppled Mr. Mubarak. “We hope that the English people go back to their senses and reject violence.”  In both Tunis and Cairo, activists joked in Twitter postings that they should send teams of experienced revolutionaries to assist the British rioters. But others were more earnest. With their own struggles with riot police officers still fresh in their memory, many struggled to identify with the cause of the rioters in London and other cities, or even to claim it as one with their own.  “Comparisons with our great #egypt uprising and kids looting at #londonriots bother me,” Simon Hanna, a British Egyptian journalist in Cairo wrote. “But you cant ignore that inequality fueled both.”  “#Tunisia Started it, and #Egypt sparked it to the world,” an Egyptian named Ziad El Adawy wrote on his Twitter account. “ #LondonRiots be aware of your rights.”  A version of this article appears in print on August 13, 2011, on Page A9 of the New York edition with the headline: For Egyptians, British Riots Are a Mix of Familiar and Peculiar. Order Reprints| Today's Paper|Subscribe
Egyptians watched this week with a mix of empathy, disgust and perhaps a measure of satisfaction as the British authorities struggled for four days to rein in arson and looting.