In a speech to parliament as he submits himself to a confidence vote that should see him re-appointed to lead Spain again next week, he promised to be "open to dialogue" as he acknowledged his government would have to negotiate "every day".
"I don't know what difficulties will emerge in the path of the future government, no doubt they will be many, and big," he said.
"My party and myself are willing to confront them and put up with sacrifices that may be necessary."
Until last weekend, Spain was heading towards unprecedented third elections in less than a year after a rollercoaster 10 months that saw the country go through two inconclusive polls.
Rajoy's Popular Party (PP) won them both times, but without enough seats to rule alone - a far cry from 2011 when the acting premier won an absolute majority.
Spain's political fate had hinged on whether the Socialists would allow a Rajoy-led minority government to rule and avoid more elections - and on Sunday they voted to do so.
After weeks of in-fighting, they voted to abstain in a parliamentary confidence vote on a PP government -- which will give it enough traction to get through the vote.
In line with post-election protocol, a first vote will be held Thursday.
The Socialists have decided to cast their ballot against him in this vote, which means he will not go through.
They will then abstain in a second and final vote, expected Saturday.
Socialist party (PSOE) lawmaker Isabel Rodriguez said that if it were up to them, they "would vote 'no' to Rajoy eternally".
But "it isn't about us, the PSOE, it's about the country and the country needs to end its (political) blockage."
But with just 137 of the 350 seats in parliament, Rajoy's government will be faced with unprecedented opposition by parties who criticise the corruption and austerity that marked his first term.
Rajoy has countered that under his leadership, Spain has returned to growth and unemployment has dropped -- although at 20 percent it is still the second highest in the eurozone.
First and foremost on his to-do list will be to get the 2017 budget approved, under EU scrutiny as Spain seeks to reduce its deficit.
The caretaker government has said at least €5 billion ($5.4 billion) in budget cuts will be needed -- a measure that is unlikely to gain the approval of opposition parties.