Former British Foreign Secretary Jack Straw has hinted that his removal may have been down to a willingness to talk to Hamas.

Labour Party member Straw served in the role for five years between 2001 and 2006, overseeing Britain's involvement in Afghanistan and the war in Iraq under Tony Blair, then prime minister.

That post came to an end for him after Hamas won Palestinian legislative elections in January 2006, sparking a US-led boycott of the Palestinian Authority, which Blair supported at the time.

At the Middle East Monitor's conference on the ongoing Saudi crisis on Saturday, Straw is reported to have said: "I am unhappy about our boycotting of Hamas. I talked off the record to some journalists in Riyadh in early 2006 and said we ought to be talking to Hamas."

He went on to add that "some people" believed he had been removed from his position after news of the comments spread.

Straw has previously told British media outlets that "neo cons" close to the then-US President George W Bush "were never terribly" keen on him and may have pressured Blair into firing him.

Blair has since rescinded his support for the boycott of Hamas.

In an interview with the Guardian newspaper in October, the former British prime minister said the UK should have tried to establish a dialogue with the group.

The change of posture came after Blair held a series of meetings with former Hamas chief, Khaled Meshaal.