David Cameron has admitted that he under-estimated the depth of the "raw" public anger over MPs' expenses as he finally conceded defeat in his battle to save his beleaguered Culture Secretary, Maria Miller.
The Prime Minister said the furious public reaction to the disclosure that she had wrongly claimed thousands of pounds in mortgage interest payments showed that further reform of the expenses system was essential.
However he was accused by Labour leader Ed Miliband of a "terrible error of judgment" in failing to sack her immediately after the publication of last week's Commons Standards Committee report.
Mr Cameron moved swiftly to replace her after her resignation today, promoting Treasury Minister Sajid Javid to take her place at Culture, Media and Sport.
The appointment left him with just three women in the Cabinet, although No 10 said Treasury Minister Nicky Morgan would take on the role of Minister for Women and would attend Cabinet meetings.
In a rowdy Commons question time, Mr Cameron insisted he had been right to stand by Mrs Miller after she was cleared of the central charge against her.
"If people clear themselves of a serious offence, you let them get on with their job, you let them try to do their job. That is actually the right thing to do," he told MPs.
"Firing someone at the first sign of trouble... that is not actually leadership, that is weakness."
He sought to deflect accusations by Mr Miliband that he had acted as "an apologist for unacceptable behaviour", offering cross-party talks on a further overhaul of the expenses system.
"There is still very deep public concern that is very raw about the expenses scandal," he said. "The biggest lesson I learned - that that anger is still very raw and it needs to be acted on."
The confirmation that Mrs Miller had finally given up the fight to hang on to her job came shortly after 7am with the announcement from Downing Street that she had resigned.
If followed a late-night phone conversation between Mrs Miller and the Prime Minister as he was returning to London after attending a state banquet at Windsor Castle in honour of Irish President Michael D Higgins.
While he was said to have expressed "sadness" after she informed him of her decision, neither Mr Cameron nor his officials would comment on reports that a No 10 figure visited Mrs Miller prior to the call to make clear she had to go.
A clearly emotional Mrs Miller insisted she took "full responsibility" for the decision, saying she had become a "distraction" from the work of the Government.
"This has been a really difficult 16 months. Because I was cleared of the central allegation made about me by a Labour Member of Parliament, I hoped that I could stay. But it has become clear to me that it has become an enormous distraction," she said, apparently close to tears.
"I take full responsibility for my decision to resign. I think it is the right thing to do to remove what has become really an unhelpful and very difficult distraction for colleagues."
Despite Mr Cameron's determination to defend her, it had become increasingly clear that her position had become untenable, with Tory MPs openly questioning Mr Cameron's decision to allow her to carry on.
Downing Street appeared to have have been hoping that, if she could survive this week, the pressure would ease as MPs departed Westminster for their Easter break.
However, with the Prime Minister facing a potentially awkward end-of-term meeting with the backbench Tory 1922 Committee - offering critics a platform to put their views to him directly - she failed to make it.
Labour MP John Mann, whose claims that she paid for a home for her parents with taxpayer-funded allowances sparked the standards probe, said it was "about time" Mrs Miller resigned.
Although she was cleared of that charge by the Parliamentary Commissioner for Standards, she was told she should repay £45,000 wrongly claimed towards mortgage payments.
The sum was reduced to £5,800 by the cross-party Standards Committee but she was ordered to apologise to the Commons for failing to co-operate with the commissioner's inquiry.
The brevity and tone of that apology further fuelled criticism of the Basingstoke MP, with opinion polls showing strong public support for her sacking and a growing number of Tory MPs joining a chorus of disapproval.
Mr Cameron said he would be giving Tory MPs the rallying cry "forward to victory" as he attempted to move on from the row around Mrs Miller.
Ahead of a meeting of the influential 1922 Committee of Tory backbenchers, which could have been explosive before Mrs Miller's resignation, he said the party faced four big fights - the local and European elections, the Scottish referendum and the general election.
He said: "The Budget shows when we talk about the economy we can do it."
Number 10 sources indicated they believed Mr Miliband "whacked it over the bar" at PMQs because he had failed to demand the Cabinet minister's resignation and had not called for reform.
A senior Tory source said the mood in the 1922 meeting was like a "relief rally" following Mrs Miller's decision to quit.
Conservative MPs had been aware of the mood on the doorstep and the awkward questions they would have faced about the expenses case as they embarked on election campaigning during Parliament's Easter recess.
The source said the 1922 meeting was "almost like a relief rally, in a sense, because people felt that comfort of knowing that it was dealt with".
Mr Cameron acknowledged it had been a "difficult week" and thanked Tory MPs for their backing at Prime Minister's Questions, the source said,
But the source said the Prime Minister received the traditional table-banging show of support from MPs as he defended his decision to stand by Mrs Miller in the aftermath of the Standards Committee report.
The senior Tory said Mr Cameron told MPs: "I hope you agree with me that rather than dropping a colleague at the first sense of difficulty, I think it's right to stand by people and give them a chance" and h e was not "somebody who cuts and runs".
There is frustration in Conservative ranks about the lack of understanding that Mrs Miller's case was a legacy of the old, discredited expenses regime and things were different under the new system administered by the Independent Parliamentary Standards Authority.
"This is the last knockings of an old system", the source said.
Almost two-thirds of British people believe Mr Cameron failed to handle the situation well, according to a ComRes poll for ITV News.
The survey showed 63% thought the Prime Minister had handled the problem badly, including 32% who thought he had dealt with the situation "very badly", with just 8% saying he had done well.
Among Tory voters, 50% were critical of Mr Cameron's handling of the situation, with just 15% believing he had dealt with it well.
Some 49% of the British adults surveyed said that Mrs Miller's case had made them trust politicians less and m ore than half (53%) believe her behaviour regarding expenses is typical of most or all MPs.
The survey showed 88% believe she was right to resign, while 82% said she should have resigned as soon as it emerged she over-claimed her expenses.
:: ComRes interviewed 1,015 British adults online on April 9. Data were weighted to be representative of all British adults.
UK Independence Party leader Nigel Farage sought to capitalise on the row by calling for the voters of Basingstoke to be given the opportunity to oust Mrs Miller in a by-election.
Ukip came a distant fourth in the constituency in 2010 - when Mrs Miller won with a majority of 13,176 and secured more than 50% of the votes cast.
But Mr Farage, who was in Basingstoke announcing his party's candidate in the seat, said voters should be given the power of recall over sitting MPs.
The coalition Government promised to introduce recall powers, which would allow voters to trigger a by-election to remove errant MPs, but has so far failed to do so.
Mr Farage said: "Yet again this is the political class looking after its own and letting down the electorate. Maria Miller's critics in Basingstoke - and there are many - should have the right to see if they can put together a petition of 10% of the local electorate as stipulated in the Coalition Agreement. I believe they would be able to clear that hurdle with ease.
"A promise was made by Mr Cameron and Mr Clegg and they have failed to honour it. That is desperately cynical as I suspect they never intended to honour it in the first place.
"Neither did Ed Miliband raise this aspect of the Miller debacle in PMQs. Voters in Basingstoke and elsewhere will be forgiven for thinking the whole political class at Westminster is once again conspiring to protect one of its own from proper democratic accountability."
The Ukip leader said Mrs Miller has "taken the mickey out of the system" and "I think it reflects very badly on David Cameron that he has completely misjudged the public mood on this".
Challenged about Ukip's own expenses scandals in the European Parliament he said: "In the cases of the two individuals who behaved badly, I removed the whip and kicked them out of the party a long time before they were found guilty of anything."
He said that although Basingstoke looked "on paper" to be a safe Tory seat, Ukip had polled 26% of the votes in the constituency in local elections last year.
On Channel 4 News Mr Farage said that his wife, who is employed as an aide, was paid a "very modest sum of money, just over £25,000 a year" but the arrangement will end "in a few weeks time".
Defending the party's use of Brussels allowances he said: "If you are accusing me and Ukip of taking the wherewithal provided in the European Parliament for us as MEPs and using it politically to campaign against Britain's membership of the European Union, if you think that's wrong that's your decision .. that is quite different from benefiting personally."
He added: "Under a Westminster regime I would be a member of a Parliament that I thought was entirely legitimate and I wouldn't need to use the money against the very existence of Westminster."