Canada’s housing agency will spend up to C$1.25 billion ($943 million) over three years to take equity positions in homes bought by first-time buyers, part of a plan by Justin Trudeau’s government to make housing more affordable for the youngest voters.

According to federal budget documents released Tuesday in Ottawa, Canada Mortgage and Housing Corp. (CMHC) will provide up to 10 percent funding for new homes and 5 percent for existing homes to reduce mortgage costs for low- to middle-income buyers. The financing would apply to insured mortgages, which are required if the buyer puts less than a 20 percent down payment on the property.

Finance Minister Bill Morneau is seeking to ease affordability concerns after price gains and rule changes in recent years pushed home ownership out of reach for many Canadians, in particular millennials who may be just starting out in the labor market.

Though prices and sales slumped in most cities in 2018, prices are still up 64 percent in Vancouver over the past five years, topping C$1 million on average, and up 56 percent in Toronto over the same period, Canadian Real Estate Association data show.

This new program — which the government expects to be used by 100,000 home-buyers over three years — may provide a shot in the arm to a market that has been a vital contributor to growth amid signs the Canadian economy is slowing.

“Sales should be boosted by this, so should prices,’’ said Brian DePratto, an economist at Toronto-Dominion Bank. “At the margin, there is more upside to demand.’’

The equity plan borrows a page from smaller nonprofit groups in Canada that already offer similar loans for low-income people. The new program, called the “First-Time Home Buyer Incentive,” will be launched in September and be available to first-time buyers with annual household incomes of as much as C$120,000. The amount of the insured mortgage would be capped at four times income, or up to C$480,000.

A buyer purchasing a new C$400,000 home with a 5 percent down payment of C$20,000 may qualify for a 10 percent, or C$40,000, contribution from CMHC. That would lower the monthly payment to C$1,745, from C$1,973, assuming a 25-year amortization and a mortgage rate of 3.5 percent, according to an example in the budget documents.

The move is “mind-blowing,” and will only fuel demand in the segment of the market that is already the most competitive, said John Pasalis, president of the Toronto-based firm Realosophy Realty.

“Why is the federal government playing mom and dad and buying everyone homes?” he said. “This is not the solution to high house prices, this is trying to treat the symptom by just throwing money at it, throwing taxpayers dollars to buy homes for people.”

As an equity owner, CMHC would benefit from any gain in the house price, or potentially absorb a fraction of any loss. It’s not clear if the homeowner would repay the amount of the loan or the equity stake based on the home value when the property is sold. Those details will be worked out in coming months, according to finance department officials. Aside from the CMHC amount, the measure will cost the federal government about C$121 million over five years.

The incentive is an extra boost for homebuilders like Mattamy Homes, which have seen prices for new projects decline. The backstop on new homes is twice as high as for existing units.

“This larger shared equity mortgage for newly constructed homes could help encourage the home construction needed to address some of the housing supply shortages in Canada, particularly in our largest cities,’’ according to the budget.

While the budget made no changes to mortgage stress tests or amortization terms — changes industry groups had called for — it did provide other forms of housing relief. The limit on tax- free withdrawals from registered retirement savings plans for first-time buyers will be raised to C$35,000, from C$25,000, the first change to the limit in a decade.

The government is also adding C$10 billion over nine years to an existing program to entice more developers to build rental units. This additional funding would support 42,500 new units. It’s also allocating C$300 million to launch a new housing supply challenge to encourage cities to open up more space for housing.

“There aren’t enough homes for people to buy or apartments for people to rent,’’ Morneau said in the text of his budget speech. “That makes finding a good place to live too expensive — beyond what many people can afford.’’