The Canadian economy, which contracted to start the year, bounced back in February, led by gains in the mining and oil and gas extraction sector.

Statistics Canada said Tuesday real gross domestic product grew 0.4% in February after a slight pullback of 0.1% in January.

The mining and oil and gas extraction sector gained 2.4% for the month as production in the oil and gas sector began returning to normal after a number of issues in January, including unscheduled maintenance shutdowns.

Economists had expected an overall increase of 0.3% in February, according to Thomson Reuters.

“The rebound in February GDP is encouraging even as oil drove a good chunk of the gain, as growth was pretty broad based,” wrote Benjamin Reitzes, Canadian rates and macro strategist at BMO Capital Markets, in a report.

“For the Bank of Canada, this report likely doesn’t change much, but reinforces the theme that the economy is in decent shape and can continue to move slowly but surely higher.”

Read: Canada’s debt-to-income ratio will stabilize: BoC’s Wilkins

Krishen Rangasamy, senior economist at National Bank, said February’s real GDP growth was the largest monthly increase since May 2017 in a Tuesday report.

Overall, 15 of the 20 industrial sectors tracked saw growth.

Goods-producing industries grew 1.2% as manufacturing and construction rose in addition to the rebound in mining and oil and gas extraction.

The manufacturing sector rose 1.0% in February, while the construction sector gained 0.7%.

Meanwhile, the services-producing side edged up 0.1%, hurt by a 0.5% decline in wholesale trade and weakness in the real estate and rental and leasing sector which was affected by mortgage rule changes at the start of the year including stress tests for uninsured mortgages.

The real estate and rental and leasing sector fell 0.2% in February after a 0.5% decline in January, the first back-to-back contractions since the summer of 2010.

The output of offices of real estate agents and brokers fell 7.9% in February after a 12.9% drop in January.

Despite February’s positive results, Rangasamy included a note of caution in his commentary: “Real GDP growth remains on track for another sub-2% annualized print in Q1 and that’s largely due to the weak January.”

But Rangasamy forecasts that Q1 growth may exceed the Bank of Canada’s estimate of 1.3% growth.

Read: Why rising yields and market volatility are good signs