(Bloomberg) -- Canada will ban many foreigners from buying homes for two years and provide billions of dollars to spur construction activity in an attempt to cool off the surging cost of real estate. 

The measures will be contained in Finance Minister Chrystia Freeland’s budget on Thursday, according to a person familiar with the matter, speaking on condition of anonymity because the matter is still private.  

Canadian home prices have soared more than 50% over the past two years. The market saw a record increase in February as buyers piled in ahead of expected rate increases by the Bank of Canada, taking the benchmark price of a home to C$869,300 ($693,000). 

The foreign-buyer ban won’t apply to students, foreign workers or foreign citizens who are permanent residents of Canada, the person said. Several billion dollars in Freeland’s budget will be allocated to building affordable housing and helping local governments update their systems to allow faster construction of new properties. 

Yet the government plans other measures that could potentially boost demand, ostensibly to help new home buyers. Freeland will introduce legislation that allows Canadians under the age of 40 to save as much as C$40,000 ($31,900) for a home downpayment within a new tax-exempt vehicle, the person said.

©2022 Bloomberg L.P.