George Osborne has moved to neutralise two of the Government's biggest political headaches by ditching plans to slash tax credits and promising to protect police budgets from cuts.
A £27 billion windfall from better-than-expected tax receipts and rock-bottom debt interest rates gave the Chancellor leeway to avoid benefit cuts to millions of low-paid families, which had been due to come in next April, and to see off warnings that underfunded police forces would be unable to cope with a Paris-style terror attack.
Delivering his annual Autumn Statement and five-year Spending Review to the House of Commons, Mr Osborne said he would still be able to hit his target of eliminating the deficit and achieving a £10 billion surplus by 2020, while reducing the welfare bill by £12 billion over the period.
But he was forced to admit that he will breach his self-imposed welfare cap in each of the next three years as a result of the tax credit U-turn forced on him by last month's defeat in the House of Lords.
Only one element of the controversial tax credit cuts - a reduction from £5,000 to £2,500 in the amount of extra income a claimant can earn without losing benefits - survives from the Budget in July, when it was predicted to save the Treasury up to £250 million a year.
Mr Osborne imposed a levy on business worth 0.5% of employers' paybills to pay for three million apprenticeships, but said that all but the biggest 2% of companies will be exempted from the charge.
Whitehall departments face real-terms cuts averaging 3.3% over the five-year Spending Review period. But if areas such as the NHS, schools, defence and aid - all protected from cuts - are excluded, the average reduction in day-to-day spending is a more daunting 19%, with transport (37%), communities (29%) and the Treasury (24%) worst hit.
However, the Chancellor said there would be a 50% increase in capital investment in transport infrastructure to £61 billion and £2 billion for flood protection, while the science budget would be protected in real terms.
Mr Osborne won loud cheers from the Tory backbenches as he announced that, rather than phasing in the £4.4 billion tax credit changes, as expected, he was going to "avoid them altogether".
And Conservative glee mounted when he declared that he would ignore a suggestion from shadow home secretary Andy Burnham that police budgets could be cut by up to 10%, and would instead protect them in real terms.
"Now is not the time for further police cuts. Now is the time to back our police and give them the tools to do the job," said the Chancellor.
"The police protect us, and we're going to protect the police."
Shadow chancellor John McDonnell questioned whether Mr Osborne would be able to deliver on his package, telling MPs: "Over the last five years there has barely been a target the Chancellor has set he hasn't missed or hasn't ignored."
But Mr McDonnell was howled down by Tory backbenchers after producing a copy of Chairman Mao's Little Red Book and suggesting the Chancellor could learn from the Chinese revolutionary.
Mr Osborne told MPs that Office for Budget Responsibility forecasts showed GDP growing "robustly" every year, living standards rising and more than one million extra jobs being created over five years.
The borrowing forecast for this year was cut from £74.1 billion to £73.5 billion, with the Government predicted to achieve a surplus of £10.1 billion in 2019/20 and £14.7 billion in 2020/21.
By 2020, state spending will be reduced to 36.5% of GDP, down from 45% when Labour left office in 2010.
The Chancellor confirmed plans to double the housing budget, with spending partly funded by a new 3% surcharge on stamp duty for the purchase of second homes and buy-to-let rental properties. Proceeds will be reinvested in areas such as London and Cornwall where local people are being priced out of home ownership, he said.
Concluding his speech, Mr Osborne said: "Five years ago, when I presented my first Spending Review, the country was on the brink of bankruptcy and our economy was in crisis.
"We took the difficult decisions then. And five years later I report on an economy growing faster than its competitors and public finances set to reach a surplus of £10 billion."
Paul Johnson, the director of the Institute for Fiscal Studies, told Sky News the Chancellor had "got a bit lucky" with the revised estimates for tax receipts.
Although scrapping the cuts to tax credits meant he would take a short-term hit next year on borrowing, in the long run the reduction to the welfare bill would be the same as previously planned as the new Universal Credit will simply be less generous than it would have been, he said.
TUC general secretary Frances O'Grady said: "The Chancellor has been forced into a spectacular climbdown on tax credits, but by the end of the Parliament many working people will still suffer big losses because he is keeping planned cuts to Universal Credit."
But CBI director general Carolyn Fairbairn, said businesses would be "pleased" by the Chancellor sticking to his guns on deficit reduction while committing himself to an industrial strategy.
"This was a good Spending Review for longer-term investment in the economy but there's a sting in the tail in the size and scope of the apprenticeship levy," said Ms Fairbairn.