Toronto-Dominion (TD) Bank and Royal Bank of Canada (RBC), two of Canada’s biggest banks, have defied cooling housing markets in the country by posting robust mortgage growth.

On Thursday, TD Bank reported a 5.8% increase in its mortgages and amortizing home-equity lines in the fiscal second quarter from a year earlier, while RBC reported a 5.2% expansion in its domestic mortgage book. Both banks reported earnings that beat analysts’ expectations, according to a Bloomberg report.

The two Toronto-based banks are bucking the trend for the country’s mortgage industry, which has seen year-over-year growth slump to a 17-year low of 3.2% in March, according to the Bank of Canada. Government efforts to calm housing markets, particularly in Toronto and Vancouver, stricter lending criteria and record-high household debt have spurred the slowdown of the overall industry.

“The cooling markets remain healthy for Canadians, and therefore for us,” Riaz Ahmed, TD Bank’s CFO, told Bloomberg in a phone interview. “During bad times or good times, we underwrite the same way, and what that means is that when markets slow down, we tend to continue to gain very solid market share.”

Meanwhile, Rod Bolger, RBC’s CFO, said that the bank believes its mortgage growth is sustainable.

“Canadians have a strong desire to be homeowners,” Bolger said. “The spring market has been relatively strong across the country, and we’re seeing growth across the country.”

Are you looking to invest in property? If you like, we can get one of our mortgage experts to tell you exactly how much you can afford to borrow, which is the best mortgage for you or how much they could save you right now if you have an existing mortgage. Click here to get help choosing the best mortgage rate