|Rajoy's centre-right People's Party won an absolute majority in November elections [AFP]
Spain's prime minister-elect has won a confidence vote in parliament, the last step in the handover process that will set the stage for him to be sworn in as the country's new leader.
Mariano Rajoy, whose centre-right People's Party won an absolute majority in November, will be sworn in by King Juan Carlos on Wednesday, when he is expected to name his cabinet.
Rajoy's warnings of austerity prompted by an ailing economy did not stop his Popular Party taking control of the 350-seat Congress, which on Tuesday voted by a majority of 187 to install him as prime minister.
The speaker of the house, Jesus Posada, declared Rajoy the winner after members of parliament stood up one by one to declare their votes, with 149 voting against him and 14 abstaining.
Rajoy, welcomed by a standing ovation, hugs and kisses from fellow party members, said he would announce his government after he is sworn in.
"I know that things are going to be difficult, but I am keen, I have hope and determination to take Spain forward," he told reporters as he left parliament.
Government ministers will formally take office on Thursday and will hold a first cabinet meeting the next day.
Rajoy comes into office facing urgent pressure to fix the nation’s economy, which has left five million people out of work. There are warnings that a fresh recession is looming.
The 56-year-old conservative leader has vowed to create jobs, clean up banks and reassure investors over the country's finances.
Public deficit cuts
Despite a reversal of its fortunes, Spain has seen its borrowing costs plummet in a debt auction, indicating renewed market confidence in its ability to handle its debt.
|Follow our comprehensive Euro Crisis spotlight coverage
In a speech to parliament on Monday, Rajoy gave the first details of his plans to cut the deficit and reassure the markets on which Spain borrows money to finance its debt.
He vowed to slash the public deficit by $21.5bn through public spending cuts, with only pensions escaping the knife.
"A government cannot do absolutely everything," Rajoy said on Tuesday after the parliamentary vote.
"A government is there to create conditions for people to be more free, so that people can work and generate well-being, wealth and jobs."
Deficit targets imposed by the outgoing Socialist government have already prompted cuts in health care and education services in some regions, sparking street protests by teachers, doctors and others.
Rajoy had vowed to stick to Spain's targets to cut the deficit to 4.4 per cent of gross domestic product in 2012 and 3.0 per cent - the EU limit - in 2013.
He acknowledged this week the country may miss its deficit target of 6.0 per cent of GDP this year and warned that if the figure reached 7.0 per cent, the government would have to make $13.11bn more in cuts.
"The more people help and join in this project for national recovery - for we are going through a serious crisis - the better for the interests of all Spaniards," he said.
In a sign that investors were encouraged by the tough words, borrowing costs more than halved when Spain auctioned more than $7.4bn in short-term government debt.
Spain's treasury had originally planned to sell $4.58 - 5.58bn in three and six-month bills in Tuesday's auction but it took advantage of the lower rates to raise the extra cash.