Canada's Finance Minister Joe Oliver speaks about the federal budget in the House of Commons on Parliament Hill in Ottawa April 21, 2015. REUTERS/Chris Wattie

The surplus will be the government’s first in eight years, accomplished with the help of the sale of assets including General Motors shares. To balance the books, the government also took a large chunk out of the cushion set aside for economic shocks such as last year’s plunge in the price of oil, a major Canadian export.

“This budget is written in black ink,” Finance Minister Joe Oliver told Parliament. The 2015-16 budget is certain to pass because of the Conservatives’ parliamentary majority.

But polls show they lack enough support to win another majority, which they might need to ensure they are not brought down by the major parties to their left, Justin Trudeau’s Liberals and Thomas Mulcair’s New Democrats.

The budget, however, includes tax cuts and could bind the opposition parties’ hands by leaving only small surpluses with which to fund new programs they may promise. The budget forecasts surpluses ranging from C$1.4 billion ($1.14 billion) for the fiscal year that started on April 1 to C$2.6 billion for 2018-19.

In creating their election platforms, therefore, opposition parties might have to look at increasing taxes, reallocating spending or returning to deficit, leaving them open to attack from the Conservatives on these issues in the upcoming campaign.

To combat the 2008 financial crisis, the Conservatives ran massive deficits, ending a string of surpluses started by previous Liberal governments. They have gradually reduced those deficits.

“From a financial market perspective, ideally you want a higher cushion than that, but I like the fact that they used it,” said Laurentian Bank Securities Assistant Chief Economist Sebastien Lavoie.

A C$2.2 billion boost from asset sales also helped achieve the surplus.

The budget entrenched major family tax cuts announced last year, including one allowing parents to lower their taxes by sharing their income. It also increased tax-free savings account contribution limits.

Trudeau said he would reverse the tax-free savings increase and the income-splitting measure, saying they disproportionately help the wealthiest Canadians. He pledged balanced budgets if the Liberals win the election.

Mulcair accused the Conservatives of giving billions to the richest “while giving bread crumbs to the middle class”.

The budget also reduced the small business tax rate to 9 percent in 2019 from 11 percent, and cut the amount seniors must withdraw annually from Registered Retirement Income Funds, lowering their taxes.

Oliver pledged more for the military and security agencies, including the Royal Canadian Mounted Police, to help combat terror threats. But much of the planned spending will be deferred.

“When there’s a limit imposed by a spectacular fall in the price of oil, you can’t do everything. That’s the reality. You have to make choices,” Oliver said.