Tony Blair has claimed he was ready to quit Number 10 if the Commons vote on war with Iraq had gone against him.
Blair: "I found it very frustrating"
The prime minister said he had told his officials to be prepared in case he had to resign.
He had even sat down to tell his children the vote would be "very difficult" and he feared he might be finished.
In an interview with the Sun newspaper Mr Blair said he kept going despite "extraordinary" opposition to the war because he believed armed conflict was the only option.
The prime minister said his wife Cherie and his three elder children had been an immense support as had the attitude of people in the armed forces.
Mr Blair said: "There were so many people against something that seemed to me in principle so obviously right.
"I found it very frustrating and... extraordinary."
Mr Blair added he had been "very upset" by the UN's failure to back a second resolution authorising military action.
It looked like we were getting bogged down
Prime minister Tony Blair
But he praised his Spanish counterpart, Jose Maria Aznar, for backing Britain and the US although just 4% of Spaniards supported the war.
"That's even less than the number who think Elvis Presley is still alive," Mr Blair reportedly told him.
The prime minister also said Labour MP George Galloway, who urged British soldiers not to fight, would be dealt with by the party's National Executive Committee.
"His comments were disgraceful," said Mr Blair.
Ten days after the war started, Mr Blair said, he had been "really worried" he had "miscalculated... the depth of resistance" and the war would be longer and bloodier than predicted.
"It looked like we were getting bogged down," he said.
He had felt terrible when he learnt of the first British war deaths - "a huge sense of sadness".
And he admitted that the death of others in Sierra Leone and Kosovo remained with him.
The prime minister added: "Once you have made that decision [to commit troops] you are going to carry it through."
Mr Blair said that he had been particularly bolstered by the father of a member of the British forces based in the Gulf who wrote to him voicing strong support for military action at the outset.
"Then he wrote to me after his son had been killed to say it was terrible - but he added: 'I still think it is the right thing to do'."
Mr Blair conceded that it had been a tragedy former Iraqi president Saddam Hussein could not have been deposed without bloodshed.
But he said he had been "delighted and relieved" as he watched television pictures of a statue of the Iraqi leader being toppled in central Baghdad.
The prime minister said that despite everything he had not suffered sleepless nights and that his two-year-old son Leo had proved a "healthy antidote" to the crisis.