TORONTO -- It appears Canadian hospitals know something about birthing babies.

A new report says giving birth was the leading reason for hospitals stays in Canada in 2012-2013, accounting for nearly 370,000 hospitalizations.

And caesarean births or C-sections were the most common surgery in the country during that period.

The data are being released by the Canadian Institute for Health Information.

It says there were nearly three million hospital stays in Canada during 2012-2013, with the average stay lasting about seven days.

Heart failure had the longest average hospital stay of 9.3 days while among surgeries, hip replacements were associated with the longest average hospitalization at 7.7 days.

There were 374,244 babies born in Canadian hospitals that year, the health statistics institute said. Just over 100,000 of the births were C-sections, making up 27 per cent of the births. Women 35 and older are more likely to have a primary C-section than younger women.

There is a continued moderate downward trend in hospital stays in Canada, says Greg Webster, the institute's director for acute and ambulatory care information services.

"This is in part due to the increased availability of outpatient procedures and services, as well as some services shifting to out-of-hospital facilities (for example, birthing centres)," Webster says.

The top five reasons for hospitalizations in the year under study were, in descending order: giving birth, respiratory disease, heart attack, pneumonia and heart failure.

The top inpatient surgeries in the same period were C-sections, knee replacements, hip replacements, hysterectomies and dilating cardiac arteries.