THE lethal mishandling of Israel's attack on a ship carrying humanitarian supplies that was trying to break the blockade of Gaza was bound to provoke outrage—and rightly so. The circumstances of the raid are murky and may well remain that way despite an inquiry (see article). But the impression received yet again by the watching world is that Israel resorts to violence too readily. More worryingly for Israel, the episode is accelerating a slide towards its own isolation. Once admired as a plucky David facing down an array of Arab Goliaths, Israel is now seen as the clumsy bully on the block.

Israel's desire to stop the flotilla reaching Gaza was understandable, given its determination to maintain the blockade. Yet the Israelis also had a responsibility to conduct the operation safely. The campaigners knew that either way they would win. If they had got through, it would have been a triumphant breaching of the blockade. If forcibly stopped, with their cargo of medical equipment and humanitarian aid, they would be portrayed as victims—even if some, as the Israelis contend, brought clubs, knives and poles. As it was, disastrous planning by Israel's soldiers led to a needless loss of life.

For anyone who cares about Israel, this tragedy should be the starting point for deeper questions—about the blockade, about the Jewish state's increasing loneliness and the route to peace. A policy of trying to imprison the Palestinians has left their jailer strangely besieged.

Losing friends, strengthening Hamas

The blockade of Gaza is cruel and has failed. The Gazans have suffered sorely but have not been starved into submission. Hamas has not been throttled and overthrown, as Israeli governments (and many others) have wished. Gilad Shalit, an Israeli soldier taken hostage, has not been freed. Weapons and missiles can still be smuggled in through tunnels from Egypt.

Just as bad, from Israel's point of view, it helps feed antipathy towards Israel, not just in the Arab and Muslim worlds, but in Europe too. Israel once had warm relations with a ring of non-Arab countries in the vicinity, including Iran and Turkey. The deterioration of Israel's relations with Turkey, whose citizens were among the nine dead, is depriving Israel of a rare Muslim ally and mediator. It is startling how, in its bungled effort to isolate Gaza, democratic Israel has come off worse than Hamas, which used to send suicide-bombers into restaurants.

Most telling of all are the stirrings of disquiet in America, Israel's most steadfast ally. Americans are still vastly more sympathetic to the Israelis than to the Palestinians. But a growing number, especially Democrats, including many liberal Jews, are getting queasier about what they see as America's too robotic support for Israel, especially when its government is as hawkish as Binyamin Netanyahu's. A gap in sympathy for Israel has widened between Democrats and Republicans. Conservatives still tend to back Israel through hell and the high seas. Barack Obama is more conscious that the Palestinians' failure to get a state is helping to spread anti-American poison across the Muslim world, making it harder for him to deal with Iran, Iraq and Afghanistan. His generals have strenuously made that point. None other than the head of Israel's Mossad, its foreign intelligence service, declared this week that America has begun to see Israel more as a burden than an asset.

That has led to the charge by hawkish American Republicans, as well as many Israelis, that Mr Obama is bent on betraying Israel. In fact, he is motivated by a harder-nosed appreciation of the pros and cons of America's cosiness with Israel, and is thus all the keener to prod the Jewish state towards giving the Palestinians a fair deal. He has condemned the building of Jewish settlements on Palestinian territory more bluntly than his predecessors did, because he rightly thinks they make it harder to negotiate a peace deal. Mr Obama's greater sternness towards Israel is for the general good—including Israel's.

Harmony is not just a dream

Israel is caught in a vicious circle. The more its hawks think the outside world will always hate it, the more it tends to shoot opponents first and ask questions later, and the more it finds that the world is indeed full of enemies. Though Mr Netanyahu has reluctantly agreed to freeze settlement-building and is negotiating indirectly with Palestinians, he does not give the impression of being willing to give ground in the interests of peace.

Yet the prospect of a deal between Palestinians and Israelis still beckons. The contours of a two-state solution remain crystal-clear: an adjusted border, with Israel keeping some of the biggest settlements while Palestine gets equal swaps of land; Jerusalem shared as a capital, with special provisions for the holy places; and an admission by Palestinians that they cannot return to their old homes in what became Israel in 1948, with some theoretical right of return acknowledged by Israel and a small number of refugees let back without threatening the demographic preponderance of Jewish Israelis.

And what about Hamas, if Israel is to lift the siege of Gaza? How should Israel handle an authoritarian movement that refuses to recognise it and has in the past readily used terror? One answer is to ask the UN to oversee the flow of goods and people going in and out of Gaza. That is hardly a cure-all, but Hamas would become the world's problem neighbour, not just Israel's. The Arab world must do more, pressing Hamas to disavow violence, publicly pledge not to resume the firing of rockets at Israeli civilians and revoke its anti-Semitic charter. The West, led by Mr Obama, should call for Hamas to be drawn into negotiations, both with its rival Palestinians on the West Bank as well as with Israel, even if it does not immediately recognise the Jewish state. It is still the party the Palestinians elected in 2006 to represent all of them. None of this will be easy. But the present stalemate is bloodily leading nowhere.

Israel is a regional hub of science, business and culture. Despite its harsh treatment of Palestinians in the land it occupies, it remains a vibrant democracy. But its loneliness, partly self-inflicted, is making it a worse place, not just for the Palestinians but also for its own people. If only it can replenish its stock of idealism and common sense before it is too late.