Finance Minister Jim Flaherty predicts that Canada may be headed for a "technical recession" on projections that the country's economy will shrink both this quarter and the next.

Speaking Sunday on CTV's Question Period, Flaherty said he would announce plans to ward off a long-term recession in the economic update he is set to deliver on Thursday.

"We may well be in a technical recession the last quarter of this year and the first quarter of next year," Flaherty said. "It's quite possible that Canada will be below the line slightly in both of those quarters, which technically would be a recession."

Some economists define a recession as two consecutive quarters of negative growth. In the past, Flaherty has taken pains to avoid the word, only saying that Canada is not immune from the economic turbulence beyond its borders.

On Sunday, Flaherty said Ottawa may keep equalization payments to the provinces in line with the country's economic growth rate, as well as restricting growth in public sector salaries, to prevent a longer recession.

But when pressed on the issue of whether the government would run a deficit, Flaherty predicted that Canada would end the current fiscal year with a modest surplus.

He also said the government is planning to run a so-called operational surplus over the next two years, meaning the government would keep spending in line with revenue.

Prime Minister Stephen Harper echoed those sentiments while he was speaking at the close of the APEC summit in Lima, Peru.

Harper said the Canadian government is currently in a surplus and is not planning to run a deficit.

But he acknowledged that "there are occasions in which deficits are not only not necessarily bad, but in fact, they are essential."

Harper said he was open to the idea of injecting a large sum of government funds into the flailing economy over the short term, provided that any resulting deficit would be a short-term solution.

"We will only do that when we're convinced of two things," Harper said. "One is that any such government expenditure would obviously be effective, and the other is that we could engage in it in the short term without developing any long-term structural budget deficits."

Canada's parliamentary budget officer, Kevin Page, issued a report earlier this week that predicts a huge federal deficit if the economy continues to weaken.

Current conditions suggest a modest deficit of $4 billion next year and $1 billion the year after, Page said Sunday.

"If we see the economy weaker, and the forecasts are getting weaker, and we have contraction next year, we could be looking at a deficit as big as $14 billion," Page said during an interview on Question Period.

Page said temporary measures to stimulate the economy, in addition to the tax cuts the government has already rolled out, would send strong signals that the government is poised to avoid a long-term economic slide.

"I think the key principles of a good stimulus package, they need to be targeted, they need to be timely and they should probably be temporary," Page said.

Flaherty said in addition to maintaining the previously announced tax cuts, spending on infrastructure, which creates jobs, may be on the way.

"We're looking very carefully at ways in which we can get infrastructure funding out the door as quickly as possible," Flaherty said.