Prime Minister Stefan Lofven called early polls after losing a budget vote about three months into his term.
Under the deal, Mr Lofven will follow the opposition's budget next year, although he can make some changes.
The government failed to push through its budget when the far-right Sweden Democrats sided with the opposition.
The Sweden Democrats emerged as a power broker after September's elections. The election - called for 22 March - would have been Sweden's first early poll since 1958.
Speaking during a press conference in Stockholm on Saturday, PM Lofven said that he was pleased to have reached a deal.
"Sweden has a tradition of solving difficult problems," he told reporters.
"I am happy that... Sweden can be governed."
The deal was reached between Mr Lofven's centre-left Social Democrats and Greens Alliance, and the four-party centre-right group known as Alliance.
Mr Lofven said the document, called "The December Agreement" will remain in force until 2022.
It commits the opposition to abstain from voting against the government's budget proposals starting from April 2015 onwards.
It also co-ordinates the parties' polices on pensions, defence and energy issues.
Mr Lofven's Social Democrats formed a minority government with the Greens in September but between them they have only 138 seats in the 349-seat parliament.
The Sweden Democrats became the country's third largest party, with 13% of the vote. Their main demand has been the reversal of Sweden's liberal immigration laws.
Sweden has offered permanent residence to all Syrians fleeing the conflict and has the highest rate of asylum applications per capita of any European Union country.
Sweden's left-of-centre government has reached a deal with the main opposition resulting in a minority government and avoiding the need for snap elections.