George Osborne has imposed austerity measures on every family in Britain after announcing a £40bn package of emergency tax increases, welfare cuts and Whitehall spending restraint designed to slash the budget deficit by the end of the parliament.

The chancellor said the "unavoidable budget" required a VAT rise from 17.5% to 20% next January, higher capital gains tax, a levy on banks, a two-year public sector pay freeze and less generous benefits, but insisted the package was needed to prevent the financial markets from turning on Britain.

In his debut budget speech, Osborne pleased the ratings agencies and the Organisation for Economic Co-operation and Development by intensifying the £73bn squeeze already planned by the last Labour government. But he signalled a second dose of gloom in October, when a three-year comprehensive spending review will spell out the size of the cuts for individual government departments.

Osborne warned today that ring-fencing the NHS and international development meant non-protected departments would face average real cuts of 25% but that some clemency would be shown to education and defence.

The chancellor avoided even deeper cuts in Whitehall by earmarking the welfare budget for more than a third – £11bn – of the £32bn reduction in spending. Child benefit will be frozen, and the government will eventually save almost £6bn a year by linking all state benefits other than pensions to the slower-growing consumer prices index rather than the retail prices index.

The Treasury will raise more than £12bn from the increase in VAT, but the chancellor sought to soften the blow from the toughest budget in modern times by raising personal allowances by £1,000, linking pensions to earnings and raising child credits for the next two years.

He said a four-year phased cut in corporation tax would help the private sector become the engine of growth, and the economy would have to rely more heavily on investment and exports over the coming years.

Seeking to pin the blame for the tough measures on Gordon Brown, the chancellor said: "Today we have paid the debts of a failed past. And laid the foundations for a more prosperous future. The richest paying the most and the vulnerable protected. That is our approach. Prosperity for all. That is our goal."

Vince Cable, the Liberal Democrat business secretary, agreed with the description of the budget as "tough but fair". Writing in the Guardian, Cable said the budget would be vilified by those who sought to undermine the coalition government or did not understand the depths of the crisis. "But it is necessary and right".

Osborne rejected criticism from Labour that the budget threatened to derail the recovery, saying that the independent Office for Budget Responsibility had only marginally reduced its forecasts for growth this year and next as a result of today's spending cuts and tax increases.

The need to placate the markets after the sovereign debt crisis in the euro area last month meant the pace of deficit reduction had to be accelerated, the chancellor added. "The consequences for Britain would be severe.

Higher interest rates, more business failures, sharper rises in unemployment, and potentially even a catastrophic loss of confidence and the end of the recovery. We cannot let that happen." Net borrowing – a combination of the running costs of government and spending on infrastructure projects – will fall from 10.1% of national output to 1.1% within five years.

The budget measures are designed to turn a structural deficit in current spending of 4.8% of GDP into a surplus of 0.3% in four years, holding out the prospect of pre-election tax cuts if the economy performs as the chancellor expects.

Tonight, the ratings agency Fitch said the budget would "materially strengthen confidence" in the country's public finances, while the Organisation for Economic Co-operation and Development, the Paris-based thinktank for developed country governments, praised Osborne for his "courage".

Harriet Harman, the interim Labour leader, picked out the Liberal Democrats for attack, saying: "This reckless Tory budget would not be possible without the Lib Dems. The Lib Dems denounced early cuts; now they are backing them. They denounced VAT increases; now they are voting for them. How could they support everything they fought against? How could they let down everyone who voted for them? How could they let the Tories so exploit them? Do they not see that they are just a figleaf?"

Nick Clegg faced tough questioning at his parliamentary party meeting tonight, but pinpointed proposals that would not have been in the budget but for his interventions. Simon Hughes, the deputy leader, said the VAT rise was difficult, but the scale of spending cuts was unavoidable. Clegg had been prepared for attacks by Labour that he has turned into a Tory patsy, but he is insistent he has ensured the budget has not followed the path of most previous fiscal consolidations by hitting the poor hardest. He also agreed with Osborne over dinner a month ago that the consolidation should represent a plan for a five-year parliament, and the bulk of the details should be spelled out now.

But figures produced by the Treasury purporting to show the richest will suffer most extend only to 2012-3, by which time most of the welfare cuts will not have been implemented. The Treasury argues that further reforms to combat child poverty will be announced later in the parliament, and cites suggestions by the Institute for Fiscal Studies that VAT is not necessarily regressive.

Clegg and Cable, who condemned a planned Tory VAT "tax bombshell" during the election, also admit privately it is not possible to tackle the deficit without hitting welfare. The Lib Dems are proud that the budget retains their plans for a rise in capital gains tax, and rightwing calls for a taper relief have been rejected.

Osborne told the Commons: "In this budget everyone will be asked to contribute but in return we make this commitment. Everyone will share the rewards when we succeed. When we say that we are all in this together we mean it." But he faces the charge that he has gone further than he needs to accelerate the deficit reduction.