Spain's toughest budget since the 1970s has cleared its first hurdle.
Lower house conservative members of parliament voted it through, hoping it will help stabilise the public finances.
The budget aims to make savings of €27 billion through spending cuts and tax increases.
The budget comes at a time when international concern over Spain's public deficit is driving up its borrowing costs.
Members of the lower house of parliament, in which the governing Popular Party holds an absolute majority, rejected amendments by opposition groups and passed the budget by 182 votes to 156.
It will later be voted on in the upper house Senate, where the party also has a majority.
The government missed out on the backing of the Catalan nationalist party CiU, which complained the budget squeeze was unfair to Spain's regions.
Regional governments control big budgets including for health and education and are under pressure to shoulder much of the austerity.
The Bank of Spain said Monday the economy had tipped back into recession, with output shrinking 0.4% in the first quarter of 2012 after a 0.3% decline in the final quarter of 2011.
The recession makes it even harder for Spain to meet its targets to reduce the public deficit because it tends to lower the state's income from taxes while raising its expenses for welfare.
"The economic situation is very difficult," Prime Minister Mariano Rajoy told reporters after Wednesday's vote.
"At this time we must highlight that the government has the strength to adopt a series of decisions that are good for Spain," he added.
"Even if the effects will not be seen in the short term, we are doing what we have to do."