David Cameron has admitted he "contemplated having to go" if Scotland voted for independence.
In an interview with the Sun on Sunday (£), he said he would have been "heartbroken" by the break-up of the UK and first considered his position when polls put the Yes campaign ahead just days before the referendum.
Scottish voters rejected independence by 55% to 45% and it was First Minister Alex Salmond who resigned, announcing hours after the result was declared that he would be stepping down in November.
Mr Cameron told the paper: "I thought about resigning because I care so passionately about this issue. If the vote had been for Scotland to have left the UK, I genuinely would have been heartbroken. I would have felt winded and wounded.
"Emotionally, one would have thought, 'I'm so saddened by this. I find it difficult to go on'."
"Of course, I contemplated having to go. I thought, 'What's the right thing to do?' In many ways the easiest thing would be to say, 'I feel wounded by this' and walk away. I'm sure it would have been absolutely awful.
"In the end I came to the conclusion that would not have been the right thing to do."
Since the referendum he has faced calls to honour pledges for more devolution to Scotland and also consider allowing only English MPs to vote on English legislation.
In a separate interview with The Sunday Times (£), Cameron said a Yes vote would have left him "very winded and wounded".
He said: “I thought about it a lot. Emotionally I would have been very winded and wounded,” he said. “I thought in many ways that is what I would want to do.”
He also said he thought about what he would say, adding. “Obviously I thought what I would have to say if there was a ‘yes’ vote. I would have felt it as a huge blow. I’m very glad I didn’t have to say it.”
“I did not sleep (on the night of the referendum). I went to bed and tried to sleep but I came down to the press office about 3am as the results came in.
"My children got up. I think they sensed how worried I was by it. They sat on my knee as the results came in.”
But he also said he doubted he would have actually resigned.
“I just don’t think it's the right thing to do," he told the paper.
"The job of the United Kingdom prime minister, whatever the outcome, would be to knuckle down and get on with the job. I think it would not have been doing your duty.”
Cameron awoke this morning in with his party in difficulty on the eve of its conference - MP Mark Reckless defected to Ukip while Brooks Newmark resigned from the frontbench over claims he sent explicit, sexual images of himself to an undercover reporter.Suggest a correction