Tony Blair has said for the first time that he and other world leaders were wrong to yield to Israeli pressure to impose an immediate boycott of Hamas after the Islamic faction won Palestinian elections in 2006.

As prime minister at the time, Blair offered strong support for the decision – driven by the George W Bush White House – to halt aid to, and cut off relations with, the newly elected Hamas-led Palestinian Authority unless it agreed to recognise Israel, renounce violence and abide by previous agreements between its Fatah predecessors and Israel. The ultimatum was rejected by Hamas. The elections were judged free and fair by international monitors.

Blair, who became envoy of the Middle East quartet – composed of the US, EU, UN and Russia – after leaving Downing Street, now says the international community should have tried to “pull Hamas into a dialogue”. The boycott and Israel’s economic blockade of Gaza, which began the following year, are still in force today. A UN report two years ago said the combined effects of the blockade and the three military offensives conducted in Gaza by Israel since 2009 could make the territory “uninhabitable” by 2020. Humanitarian conditions have worsened markedly since the report was written.

Interviewed for my new book Gaza: Preparing for Dawn, out later this month, Blair said: “In retrospect I think we should have, right at the very beginning, tried to pull [Hamas] into a dialogue and shifted their positions. I think that’s where I would be in retrospect.

“But obviously it was very difficult, the Israelis were very opposed to it. But you know we could have probably worked out a way whereby we did – which in fact we ended up doing anyway, informally.”

Blair did not elaborate on subsequent “informal” dealings with Hamas but he appears to be referring to clandestine contacts between MI6 and Hamas representatives during and possibly after the kidnap of BBC journalist Alan Johnston by an extreme fundamentalist group in 2007. The kidnappers eventually released Johnston after heavy pressure from the Hamas de facto government.

Since leaving his Quartet post, Blair has held at least six lengthy private meetings with Khaled Meshaal, the Hamas political bureau chief until earlier this year, and his successor Ismail Haniyeh, partly to explore a possible long-term ceasefire between Israel and Hamas. But the international block on official contacts with Hamas has eroded western leverage in the region, increased the isolation and suffering of the Gaza public, and helped to drive the faction into the arms of Iran – all without dislodging it from its dominance of Gaza, say critics.

Blair’s rare rethink of a key foreign policy issue has surfaced as Hamas and Fatah embark on a new Egypt-brokered effort to end the schism between the two factions after a preliminary reconciliation agreement signed in Cairo last week. The split was triggered by the brief but bloody 2007 civil war in Gaza which left a victorious Hamas in charge of the coastal enclave and President Mahmoud Abbas running the West Bank-based, Fatah-dominated Palestinian Authority

Also interviewed in the book, Jonathan Powell, Blair’s former chief of staff at Downing Street, goes further, saying the Quartet strategy was “a terrible mistake”. Negotiations with Fatah alone – long promoted by the US – meant that “you have to make a concession to Fatah, then you have to make a new concession to Hamas afterwards. You want to have one negotiation, not two … If you got a united Palestinian team to negotiate with, then life would have been a whole lot easier.”

The book also cites internal Whitehall documents from January 2006, obtained under the Freedom of Information Act, which warned immediately after the Palestinian elections against ostracising the new Hamas-led authority. A heavily edited minute from the Department for International Development points out that Israel and Hamas were already co-operating at a municipal level, and suggested it would be difficult in the short-term for Hamas to renounce “its commitment to the destruction of Israel and its support for terrorism”. Instead, it suggested that “ultimately Hamas’s participation in the realities of political responsibility might bring about Hamas’s transformation to a political rather than terrorist organisation”.

A Foreign Office “e-gram” from Brussels quotes a senior European commission official saying that a million Palestinians relied directly and indirectly on EU funding. The report added: “To withdraw it would have dramatic consequences and could lead to violence. The EU was under no obligations to align its position on financial support with that of the US and Israel. The EU had not done so in the past. The wider region was watching the EU response to these elections. If we seemed, by our actions, to be rejecting the results then our claims to promoting democracy would be undermined.”