The new head of Canadian Pacific railway received a compensation package totalling more than $49 million during his first six months on the job, most of it to make up for pension and other payments that his previous employer refused to pay when he took the top job at the rival railway.

Hunter Harrison was appointed CEO at the end of June after a bitter fight with Canadian Pacific's largest shareholder.

Harrison's direct compensation, including a $1-million base salary, totalled $4.1 million in 2012, according to information posted ahead of the company's May annual general meeting.

There was another $44.5 million to make Harrison "whole" for pension, restricted stock unit and other payments that Canadian National Railway refused to pay.

"Mr. Harrison has been a significant catalyst for change and in less than a year with Canadian Pacific, he has taken this railway to new levels of operational excellence," said Canadian Pacific spokesman Ed Greenberg in an email.

Appointment caused controversy

Formerly the CEO of CN Rail, Harrison has been widely credited with turning CN into one of the most efficient railways in the world.

Prior to Harrison's appointment, Canadian Pacific had significantly lagged its peers in terms of performance and stock price.

This prompted its largest shareholder, New York-based hedge fund Pershing Square, to lobby for a replacement for then-CEO Fred Green.

Pershing was able to get enough support from other majority shareholders that Green eventually stepped down.

Paul Haggis became Canadian Pacific's new chairman and recommended Harrison for the job.

The appointment initially caused controversy since Harrison had signed a non-compete clause while at CN forbidding him to work for a competitor for two years.

Although that restriction had expired by the time he took the top post at Canadian Pacific, CN ended Harrison's pension payouts and other payments worth roughly $45 million, stating their concern that he might use his knowledge of confidential CN knowledge in his new role.

CN took legal action, accusing Harrison of breaching non-compete and other agreements.

The suit was settled last month and Canadian Pacific has been cutting its workforce since Harrison's appointment and is in the process of moving its headquarters out of downtown Calgary to be nearer to its suburban railyard.

With files from The Canadian Press