Tony Blair has admitted that he created a period of "uncertainty" for his government when he announced he would step down later this year.
Tony Blair did not want to be ousted like Margaret Thatcher
"It hasn't been easy," he said in an interview with the Observer newspaper.
But he insisted that he would have had "a load of different problems" if he had not announced his plans to quit.
The prime minister said he did not want to repeat Margaret Thatcher's experience of being "absolutely belted and chucked out" by her own party.
In a wide-ranging interview with the Observer, Mr Blair suggested that his departure would help the Labour Party win back voters who deserted it because of his decision to support US-led military action in Iraq.
Talking about the 2005 election, he said: "Iraq was a factor then. In a sense, when I go, that goes with me."
Mr Blair played down suggestions that his successor would have to call a snap election to earn his own mandate as prime minister, saying he expected it to be "a significant time" before the poll was called.
He declined to offer a fresh endorsement of Gordon Brown as his successor, referring instead to the "myriad of complimentary things I have said in the past" about him.
He refused to rule out the possibility that David Cameron's Conservatives would win the next General Election, saying only that Labour should not be "fearful" of the opposition.
Choosing a new leader, would be "a test of maturity" for Labour, said Mr Blair.
But he rejected suggestions that the launch of a website to debate future Labour policy by Blairite former ministers Charles Clarke and Alan Milburn would stir up trouble for the party.
On his decision to announce his plans to quit as prime minister, he said: "It wasn't really my desire last year to have a situation where all this uncertainty was created.
"There is always a debate about whether I was sensible to say I wouldn't fight a fourth election - though personally I think I'd have had a load of different problems if I hadn't.
"It hasn't been easy, but I'm pretty sure it wouldn't have been easier if I hadn't said it. Mrs Thatcher kept saying she was going on and on because people kept asking her, and in the end she got absolutely belted and chucked out."