Canada Mortgage and Housing Corp.'s seasonally adjusted rate of residential construction starts rose to 202,818 in June, up from 196,981 units in May.
Economists had estimated there would have been a decline in the annualized rate to 190,000, according to Thomson Reuters.
"Amidst a string of weaker-than-expected economic indicators, housing activity is proving to be the bright spot in the second quarter of 2015, providing some offset to what is ostensibly rounding out to be an otherwise disappointing economic backdrop," Royal Bank economist Laura Cooper wrote in a note after CMHC released its report Thursday.
There has been a string of disappointing economic news in recent weeks including a contraction of the economy in April leading some economists to suggest Canada dipped into recession in the first half of the year.
Speculation has also increased that the Bank of Canada may look to cut its key interest rate next week when it is expected to trim its economic outlook for the year in its monetary policy report.
CMHC said Thursday the increase in starts came as the number of urban multiple-unit projects gained 3.7 per cent, while single-detached urban starts gained 2.0 per cent.
Regionally, the pace of urban starts increased in British Columbia, Quebec, the Prairies and Atlantic Canada, while it slowed in Ontario.
Rural starts were estimated at a seasonally adjusted annual rate of 14,098 units.
"If there's a recession in Canada, nobody told the housing market," BMO senior economist Robert Kavcic said.
"Even in Alberta, where the resale market has corrected, new construction activity is holding up reasonably well considering the challenges."
Meanwhile, Statistics Canada said its new housing price index rose 0.2 per cent in May, following a 0.1 per cent increase in April, as gains in Ontario and Saskatchewan were offset in part by a drop in Quebec.
The combined region of Toronto and Oshawa was the biggest contributor to the increase as builders reported market conditions and higher land development costs as the primary reasons.
Hamilton and Saskatoon both recorded 0.4 per cent price increases in May.
On a year-over-year basis, the index was up 1.2 per cent in May, up slightly from the 1.1 per cent increase in April.
Also on HuffPost: