In hindsight  it wouldn’t have required much for Boris Johnson to be shunned by the Palestinians on his tour of Israel and the West Bank. That the mayor even set foot in Israel would frankly have been too much for many in Ramallah.

The fact he then had the audacity to praise Israel’s hi-tech achievements and condemn boycotts would have crossed a red line for many more. The idea he would do all that while respecting Israel’s democracy in a region where such qualities are hard to come by was apparently just too much to bear.

Never mind that the mayor’s office went to exhaustive efforts to assemble a programme that would shine a spotlight on Palestinian businesses, as it did in Israel. Never mind that he told a Jerusalem audience that Israel had failed to fully live up to Churchill’s vision for the country.

Never mind that he forensically examined the geography of the region with a human rights lawyer who opposes the security barrier and settlements. Suggestions abound that efforts were made to whip up an anti-Boris storm on social media.

The BDS brigade will no doubt consider this a great result. But whoever is responsible for ensuring Boris’ trip ended with a whimper should know they ultimately squandered a rare opportunity for Palestinian society – a chance to showcase its business triumphs, forge new links with London, one of the world’s leading industrial hubs, and contribute to easing the economic hardships.

They could even have highlighted their grievances in front of some of Britain’s most famous media organisations. Instead, they achieved nothing but a brief news story that will be forgotten in days.

Even the Palestinian prime minister, who went ahead with his planned meeting with the mayor, shunned media coverage.

Such actions are self-destructive in the extreme. The knee-jerk reaction of some has been to place blame – at least in part – on Boris’ shoulders. His colourful language and bluster, they claim, brought all this on himself.

But that is to ignore the fact many prominent figures carry similar messages against boycotts and in favour of Israel’s democracy when they arrive in the region.

This sorry episode is another reminder of how difficult it is to please both sides in this intractable conflict.

Far from confirming the idea of the London mayor as some sort of cartoonish buffoon, as critics may claim, this visit showcased an intelligent, enquiringly and engaged politician, bolstered by a rare wit that helps him convey political messages like few others. It’s an effective quality for those willing to listen.