Tony Blair came within days of quitting as prime minister to mount a bid to become president of the European Commission, one of his closest advisers has claimed.

The diaries of Alastair Campbell, Mr Blair's high-profile director of communications, suggest Mr Blair sounded out the likes of then French president Jacques Chirac and then German chancellor Gerhard Schroder on the possibility of him taking over the top job in Europe.

Serialised in The New European, Mr Campbell claims that Mr Blair only abandoned the plan because he feared he was being driven out of office by the well documented battle between Mr Blair and his then chancellor Gordon Brown.

Mr Campbell's diaries also claim that Mr Blair openly talked about quitting on the night he won his third election in 2005, which saw Labour's majority significantly reduced.

The diaries cover the period from 2003 to 2005, after Mr Campbell had resigned over the Iraq war but still remained a confidant of Mr Blair in an unofficial capacity.

Mr Blair is said to have plotted his move to become European Commission president in 2004.

Mr Campbell told The New European: "A lot of the time the press exaggerated our difficulties.

"This was one period where, if anything, they underplayed them because they didn't know just how bad things were.

"This was the closest Tony got to leaving and at the time I was terrified it would get out because it was one of those stories that would have taken on its own momentum.

"Tony had pretty much had enough and was being ground down by Gordon. In the end he realised that and decided he had to stay and see it though.

"Then came another on-off saga when he decided he was going to sack Gordon."

Mr Campbell said it was "amazing" Mr Brown and Mr Blair were able to work together in the 2005 general election, given the depth of division at the heart of New Labour.

Mr Blair is said to have decided to sack Mr Brown in January 2005, and won John Prescott's support for a "back me or be sacked" strategy.

Mr Blair reportedly stood down from such a bold move, despite having serious misgivings about his former friend's temperament to do the top job.

Other claims outlined in the first extract include Mr Campbell being sounded out by Mr Blair to become his full-time representative in Iraq.

Both Mr Blair and Mr Campbell have been heavily criticised for their role in making the case to invade Iraq, including in this year's Chilcot report.