CALGARY -- Canadian Pacific Railway Ltd. (TSX:CP) posted higher first-quarter profits on Tuesday that beat market expectations, despite having to cope with a particularly harsh winter.

Net income for the first three months of the year was $254 million, up 17 per cent from $217 million during the same 2013 quarter.

On a per-share basis, the profits amounted to $1.44 -- topping the average analyst estimate of $1.41 and last year's earnings per share of $1.24.

Shares in the Calgary-based railway soared more than five per cent in morning trading on the Toronto Stock Exchange, rising to $172.60.

"CP delivered solid results in a period that was severely impacted by extraordinary cold and severe winter weather conditions," said Canadian Pacific CEO Hunter Harrison in a statement.

"Despite a slow start to the year and the reduced capacity which limited our ability to meet strong customer demand, we still have the utmost confidence in our ability to achieve our financial targets for 2014."

Quarterly revenue was up modestly -- rising to $1.509 billion from $1.495 billion in last year's first quarter.

CP's operating expenses declined to $1.086 billion from $1.133 billion.

Its operating ratio -- a closely watched metric in the rail industry that tracks operating expenses as a percentage of revenues -- improved by 3.8 percentage points to 72 per cent.

In a research note, RBC Capital Markets analyst Walter Spracklin said the focus will be on management's tone and outlook for future performance, now that the first-quarter weather woes are in the rear-view mirror.

Canada's two biggest railways -- CP and Montreal-based Canadian National Railway (TSX:CNR) -- were under pressure during the quarter to deal with a backlog of grain shipments caused by a combination of factors, including an unusually large harvest and the weather-related difficulties.

The federal government ordered the rail companies to increase the amount of grain they moved to a minimum of one million tonnes per week or face fines of up to $100,000 per day and introduced proposed changes to the Canada Grain Act and Canada Transportation Act in an effort to clear a transportation bottleneck.

Canadian Pacific's position was that the legislative changes would not move the unusually big grain harvest to markets more quickly, given that its employees were working around the clock to cope with an extremely harsh winter.