With last winter’s harsh weather behind them, Canadians opened their warmed up wallets in the second quarter, spending the economy to an annual growth rate of 3.1 per cent, beating analyst expectations.

Statistics Canada said Friday the increase in the gross domestic product was the strongest pace in nearly three years and compared with a 4.2 per cent rise in GDP south of the border.

The jump came as the agency updated its result for the first quarter to an annual pace of 0.9 per cent compared with an earlier reading of 1.2 per cent in the first three months of the year.

“The Canadian economy looks to be firing on more cylinders after a particularly tough winter,” said TD Bank senior economist Randall Bartlett.

“Momentum heading into the second half of the year is also strong,” he added.

Economists had expected a growth rate in the second quarter of 2.7 per cent.

While economic growth seen in the second quarter was a significant top-up from the beginning of the year, Canada’s economy has so far proven to been less volatile than in the United States, where first-quarter numbers tumbled, only to be offset by a dramatic rise in second-quarter performance.

On a monthly basis, the Canadian economy grew in June by 0.3 per cent compared with economist expectations for growth of 0.2 per cent.

Statistics Canada said there was growth in every sector during the quarter, save for non-profit institutions serving households.

Consumers led the increase, with household consumption up by 0.9 per cent for the three month period ended June 30. Canadians spent 1.2 per cent more on goods in the second quarter, and 0.7 per cent more on services.

Spending on housing showed a marked increase with investment in residential structures up 2.9 per cent by quarter and home ownership transfer costs up by a full 9.0 per cent after two previous quarters of decline.

Exports were also up by 4.2 per cent in the second quarter _ the strongest performance since the third quarter of 2011 _ after declining by 0.2 per cent in the first three months of the year.

Significant increases were seen in exports of vehicles, farm and fishing products, forestry products and packaging materials.

Export growth is expected to continue through the rest of the year, although at a modestly slower rate, predicted RBC assistant chief economist Dawn Desjardins.

“While we do not expect the very rapid pace of export growth in the second quarter to be replicated, we are looking for exports to post solid gains in the second half of the year resulting in net exports providing a lift to GDP growth,” Desjardins said in a note to the bank’s clients.

Business capital spending was also up in the second quarter, by 0.8 per cent after two consecutive quarterly declines.

However, businesses slowed spending in other areas, accumulating roughly $7.0 billion in inventories during the second quarter, down from $14.5 billion in the period from January through March.

Retailers also reduced their inventories of non-durable goods by $2.8 billion.

Service industries increased output in the second quarter by 0.8 per cent, with notable increases seen in retail and wholesale trade, transportation and warehousing.

Spending by business on intellectual property products was down by 2.8 per cent, maintaining a trend from the previous month.

There were also declines in investment in mineral exploration, research and development, and software.

Finance Minister Joe Oliver lauded the overall numbers, saying in a statement that the economic growth seen this year will keep Ottawa on track to balance the federal books in 2015.

Indeed, the latest figures from the Finance Department indicated that the federal budget was headed in the right direction.

The government recorded a budgetary surplus of $1.6 billion in June, according to the fiscal monitor released Friday. That compared with a surplus of just $200 million in the same month last year.

Revenues came in $900 million higher in June, a jump of 3.8 per cent, thanks to increased collection of non-resident income tax, excise taxes and duties, as well as increased employment insurance premiums.

For the quarter from April through June, the government recorded a surplus of $400 million, compared with a deficit of $2.6 billion in the same period of fiscal 2013–14.