OTTAWA (Reuters) - Canada posted a budget surplus in 2014-15 to end a string of deficits a year earlier than expected, final numbers showed on Monday, bringing welcome news for the Conservatives’ re-election campaign.

The Canadian flag flies on Parliament Hill in Ottawa August 2, 2015. REUTERS/Blair Gable

The country had a surplus of C$1.9 billion ($1.4 billion), the finance department’s Annual Financial Report of the Government of Canada showed. The deficit had been projected at C$2.0 billion in the most recent budget released in April.

It was the first time Canada was in the black since 2007-08. The government ran six consecutive years of deficits starting in 2008-09 after launching a spending program to boost the economy following the global credit crisis.

The government has promised to run a surplus for the current fiscal year, but with oil prices slumping and the economy starting the year in a mild recession, the opposition has questioned whether it will succeed. The left-leaning New Democratic Party (NDP) has also pledged balanced budgets, while the Liberals plan to run deficits in order to spend on stimulus.

Liberal Party Leader Justin Trudeau said Prime Minister Stephen Harper had cut spending in order to deliver the balanced budget ahead of the election.

“It was a political goal that actually has helped us slide into ... recession,” Trudeau said.

Still, the news could bolster Harper’s argument the government will be able to stay in surplus and give credibility to the Conservatives’ claim of good fiscal management. Harper said in a statement on Monday that “now is not the time for long-term deficits or higher taxes.”

NDP leader Tom Mulcair called the numbers good news for Canadians that show “that the NDP is going to be starting off on the right foot.”

Revenue for 2014-15 was C$3.0 billion higher than expected on gains in personal and corporate income taxes. Total program expenses were moderately lower.

The better-than-expected result gives some upside risk to the government’s budget projections over the coming years, though weaker growth prospects since April will temper that, Laura Cooper, economist at RBC, wrote in a note.

A budget watchdog in July forecast a C$1.0 billion deficit this year after using up the budget’s C$1 billion contingency reserve, in contrast to the government budget forecast for a C$1.4 billion surplus, plus the reserve.

In the first three months of the current fiscal year, Canada posted a C$5.01 billion surplus, helped by the sale of General Motors shares.