Holed up under the belle époque domes of his presidential palace this week, ailing Egyptian leader Hosni Mubarak would not have heard the crowds chanting his name on the streets of Cairo, Alexandria, Fayoum and other major cities across the country.

Which is just as well, as their words were enough to send a chill down the spine of any Arab autocrat fighting to maintain his grip over a nation increasingly reluctant to afford those at the top of the political tree any kind of credibility. "Ya Mubarak, Ya Sahyoni" ("Mubarak the Zionist") sang the protesters, as anger over Israel's deadly assault on the Gaza aid flotilla gathered momentum. "Down with the siege, down with Mubarak."

Only last month the Israeli newspaper Haaretz was describing the relationship between Mubarak and Israeli prime minister Binyamin Netanyahu as a "wonderful friendship" and claiming that Bibi felt closer to the 82-year-old Egyptian than to any other world statesman.

Well, friends can sometimes cause each other headaches, and Israel's bout of gung-ho piracy on Monday has just handed Mubarak a head-splitting migraine right at the moment when he needed to be at the top of his game.

Domestically, Egypt's role as an accomplice in Israel's crippling siege of Gaza has long been Mubarak's biggest political vulnerability. As well as keeping the border at Rafah largely sealed and regularly gassing the underground tunnels that the Palestinian territory relies upon for economic survival (not to mention the construction of a 18m deep underground steel wall intended to cut them off altogether), Egypt has also consistently blocked aid convoys from entering the Gaza Strip and played a hefty part in the failure of rival Palestinian factions Hamas and Fatah to reconcile their differences.

The rewards reaped by Egypt's ruling elite for facilitating an illegal blockade against a fellow Arab community are two-fold. First, Cairo gets to contain and cripple Hamas, whom it identifies as a threat to its own national and regional hegemony – not least due to the Islamist party's links with the semi-outlawed Muslim Brotherhood opposition movement back home. Second, it brings Egypt firmly into the fold of the comically titled "moderate" grouping of Middle Eastern autocracies that enjoy American support.

Making nice with Israel opens the door to billions of dollars worth of aid from Washington, money on which Mubarak's clique depend to fund the security apparatus that sustains them in power. It also helps ensure that the west turns a blind eye to the flagrant transgressions of democratic principles and human rights that emanate out of this volatile corner of North Africa with awkward regularity.

But the price the Egyptian government pays for this deal comes in the form of public legitimacy. Egypt may be formally at peace with Israel but the vast majority of the population remain steadfastly opposed to cultural normalisation with the Zionist state, never mind unequivocal political and logistical support for the economic and social strangulation of one-and-a-half million neighbouring Palestinians. The murder of flotilla activists has, predictably, fuelled a surge of anti-Israeli sentiment among many Egyptians. The challenge now for the fragmented anti-Mubarak opposition movement is to channel that sentiment towards condemnation of Egypt's own government as well.

Recent history is on their side. Over the past decade regional political crises have twice produced a sharp spike in the number of people demonstrating on the streets in Egypt, firstly at the outbreak of the Palestinian intifada in 2000 and subsequently during the US-led invasion of Iraq in 2003, when 40,000 people occupied Cairo's central Tahrir Square for a full 24 hours before riot police managed to disperse them.

On both occasions, protests relating to events taking place abroad quickly mushroomed into a powerful critique of local tyranny, with linkages drawn between injustices playing out beyond Egypt's borders and the oppression so pervasive within them.

The flotilla controversy already appears to be following suit. Egyptian protesters denouncing Israel this week extended their anti-siege slogans to cover their own immediate experience of being kettled-in by baton-wielding riot police; on Tuesday, the day of rigged elections to the upper house of Egypt's parliament, TV cameras filmed one veteran dissident likening Israel's actions in Gaza to the Egyptian government's "massacre" of people's votes.

"Unanimously now, whenever protesters get together, you'll find their first chants are against Mubarak. Whenever anything happens with Palestine and Israel, the strongest impact is here in Egypt. It's very ironic: we have the most treacherous regime when it comes to the Palestinian cause – Mubarak is America's most senior thug in the region – and yet the people of Egypt are among the most sympathetic you can find in terms of the Palestinians, because they can understand the correlations between the Palestinian issue and their own situation."

It is wise not to exaggerate the potential of such protests; numerically they remain small and, as another long-term dissident, Ahmed Salah, explained to me recently, most Egyptians remain fearful of expressing public opposition to Mubarak for fear of the consequences. "The majority of people, if you ask them about getting on to the streets to show their anger, simply reply 'Mafish fayda' ('It's no use'). They don't want to sacrifice themselves in vain."

But that doesn't mean that Mubarak is off the hook. With economic standards declining, political stagnation entrenching and more (highly flawed) elections approaching just at the time when the president is widely perceived to be close to his last breath, Israel's bloodshed in the Mediterranean injects a new element of uncertainty into what amounts to a perfect storm for the octogenarian's regime.

Even more worryingly for the Egyptian government, the very leverage it held in the Israel/Palestine arena may itself be draining away. "The situation is explosive and in the upper echelons of the state there's total confusion in terms of how to handle it," el-Hamalawy argues.

Caught between his people and his paymasters, tough times lie ahead for one of the Middle East's oldest western stalwarts.