BEAMING at the wheel of a shiny black limousine, Ismail Haniyeh, the prime minister of Gaza who is a leading light in Hamas, the Palestinians’ main Islamist movement, personally drove his first-ever visiting head of state, the emir of Qatar, through lavishly decorated streets on October 23rd. Such was the hubbub that on a brief walkabout, local security men briefly abandoned Sheikh Hamad bin Khalifa al-Thani to take pictures of his glamorous wife, Sheikha Moza, calling her “mouzza”, or “hot chick”, to get her full attention.

For Hamas, the visit marks a long-awaited breakthrough after years of siege, war and ostracism that followed its takeover of Gaza in 2007. It laid on all the trappings of a state visit, including a guard of honour, a convoy of some 50 flashy cars and, as befits a coming-out parade, the first public appearance of Mrs Haniyeh, the prime minister’s demure wife. Banners on roadsides showed pictures of Mr Haniyeh smiling at the emir, as if they were both heads of state. The face of Mahmoud Abbas, Palestine’s titular head who ruled Gaza until Hamas forced him out of the narrow enclave, was nowhere to be seen.

The royal visitor came bearing gifts, naturally. Qatar is giving $400m to help rebuild war-battered Gaza, an increase of $150m on earlier promises. But money was the least of it. In his welcome address, Mr Haniyeh said that the emir’s visit had ended Gaza’s economic and political isolation and, without blushing, declared “al-Intisar ala’l-hisar”: victory over the state of siege imposed by Israel.

Watching Gaza slip ever further away from his grasp, Mr Abbas’s people condemned the visit for consecrating Hamas’s breakaway statelet, calling it an affront to the authority of the Palestine Liberation Organisation (PLO), the ageing umbrella group which he also heads. With his Palestinian Authority near bankrupt, he fumes that Qatar is funding Hamas, not his lot.

The emir’s visit was helped along by Gaza’s neighbours. Egypt facilitated his transit through the Sinai peninsula and sent its education minister along for good measure. Muhammad Morsi, Egypt’s president, promised that machinery and building materials for Qatari development projects could cross overland to Gaza, signalling his readiness to open up the border at Rafah to goods traffic.

And despite huffing and puffing, Israel, was also amenable to the visit, said diplomats. It suspended its retaliation for a soldier maimed by Palestinian militants shortly before the emir’s arrival until after he had left. Qatar might yet mediate between Hamas and Israel and the West.

The only people underwhelmed by the Qatari visitor were Gazan residents. Crowds did not pour onto the streets; the emir cancelled a scheduled open-air address after only a few hundred filled a stadium which could hold tens of thousands. Gaza’s have-nots have heard promises of development money before, not least from Qatar, only to see the cash disappear. Many expect Hamas alone to enjoy Qatar’s largesse, an impression accentuated by Hamas’s security guards pointing their guns at the few people who had came to see the emir. Some fear that the Gaza visit is merely the latest in a series of bold takeover bids by the gas-rich but underpopulated Gulf state following its strong support for Islamists among the revolutionaries in north Africa and Syria.

On paper Gaza’s transformation under Hamas in recent years is impressive. It has faster rates of growth than Mr Abbas’s West Bank fief, despite copious foreign support for the latter. As Mr Haniyeh noted in his welcome address, holy warriors have in some cases turned into house builders, converting the rubble left behind by Jewish settlers into high-rise blocks. In a sign of how Hamas, a movement that once sent suicide-bombers to the next world, is adapting to comforts in this one, Mr Haniyeh kissed an unveiled girl after she entertained the emir with a song.

But Hamas’s rise is not yet assured. Many Gazans have a nagging sense that the group has created a one-party state at their expense. Protests have erupted in once loyal pockets, like the Bureij refugee camp. Religious puritans, who once saw Hamas as an Islamist partner, say it has forsaken the chance to build a theocracy. And Israel could yet sever Gaza’s foreign ties and stymie Qatar’s reconstruction plans by force of arms and diplomacy, just as it did with a project financed by the European Union ten years ago.