(Adds quotes, details of budget plan)
OTTAWA, March 19 (Reuters) - Canadian Prime Minister Justin Trudeau's government, seeking to move past a political crisis threatening its re-election prospects, lavished new spending on middle-class voters in its final budget on Tuesday ahead of October's vote.
The budget was aimed at boosting consumer spending at a time when the economy is slowing, while shifting the narrative away from a scandal involving a major engineering and construction company that has shaken the ruling Liberal Party government.
Trudeau has been on the defensive since Feb. 7 over allegations that top officials leaned on his former justice minister to help SNC-Lavalin Group Inc avoid a corruption trial.
The issue has dragged the party down in opinion polls, which indicate it is at risk of losing power to the official opposition Conservatives in October's federal election.
The budget sprinkled benefits widely among income and age groups. It outlined C$21 billion ($15.8 billion) in spending over five years on new measures, including help to get first-time buyers into housing, a new skills training benefit, new perks for retirees and students, and the creation of a federal agency to cut the cost of prescription medications.
"There's a growing sense of uncertainty taking root around the world ... and Canada is not immune to those worries," Finance Minister Bill Morneau said in a prepared budget speech.
With all the new spending, the projected deficit in 2019-20 inched up to C$19.8 billion ($14.86 billion) from the C$19.6 billion forecast in November. But that is sharply higher than the projected C$14.9 billion deficit for the current fiscal year ending March 1, which was revised down from a previous projection of C$18.1 billion.
"The challenge I think with this budget is that there are so many boxes they tried to tick - everybody will get a little bit, but nobody will get enough," said Craig Wright, chief economist at Royal Bank of Canada.
One of the budget's highlights involved measures to help millennials and other first-time buyers - who have struggled to buy homes amid rising interest rates and stricter mortgage rules - boost their purchasing power without taking on too much debt.
The new program lets first-time buyers finance a portion of their home purchases through a shared equity mortgage with the Canadian Mortgage and Housing Corporation (CMHC), a government housing agency.
Under the plan, the CMHC would provide 10 percent equity on a new home or 5 percent on a resale home. It would then share in any upside benefit or downside risk, and the government said the move would incentivize the construction of new housing supply.
The move, along with other housing incentives, could give Canada's housing market a much-needed shot in the arm, reviving construction and bolstering homeowner sentiment, although economists warned the overall impact may be marginal.
"It is a potential concession that they went a step too far in dampening the housing market," said Doug Porter, chief economist at BMO Capital Markets.
BUSINESSES LEFT OUT
There was little in the budget for corporate Canada, despite repeated calls from business groups for wide-ranging tax cuts or changes to boost competitiveness.
In his November budget update, Morneau unveiled a plan to allow businesses to write off additional capital investments to help them compete globally but stopped short of slashing taxes saying it would cost tens of billions.
The budget on Tuesday did include a new training benefit, which will give workers money toward tuition and paid time off work to pursue new skills.
The measure could help employers that say they are struggling to fill jobs requiring specialized skills, notably in the technology and healthcare fields.
The budget also provided about C$3.8 billion over five years in spending on Canada's indigenous people and inched forward a plan to broaden the state-funded healthcare program to help people deal with prescription drug costs.
The budget blueprint, which is expected to be implemented given the Liberals' parliamentary majority, also maintained a C$3 billion a year fiscal cushion, a rainy-day reserve to guard against unexpected events that could weight on the government books.
Still, some economists were concerned that the growth numbers used in the budget were too rosy and could put at risk efforts to steadily reduce Canada's net debt-to-GDP ratio.
($1 = 1.3312 Canadian dollars) ($1 = 1.3320 Canadian dollars) (Reporting by Julie Gordon; Additional reporting by David Ljunggren and Fergal Smith in Ottawa; Editing by Denny Thomas and Peter Cooney)