Canadian Pacific Railway Ltd named Hunter Harrison its chief executive, months after a boardroom shakeup had been triggered by a top shareholder's calls for a change in leadership.

Harrison, the former CEO of rival Canadian National Railway Co, had widely been considered the most likely replacement for Fred Green, who had quit as chief executive of Canadian Pacific, the nation's second-biggest railroad firm, hours before an annual meeting in May.

Shares of Canadian Pacific have gained about 12 percent over the past six months.

Green and Canadian Pacific Chairman John Cleghorn resigned in May after a proxy-battle defeat by activist and top investor William Ackman, whose firm, Pershing Square Capital Management, owns 14.1 percent of the company .

Ackman had said that Harrison - who boosted efficiency at Canadian National Railway, the nation's biggest railroad, by cutting costs and pushing for punctual rail service - was the best person to turn around Canadian Pacific's industry-lagging performance.

Indeed, in operating efficiency, Canadian Pacific has lagged Canadian National since the mid-1990s.

Harrison, who grew up in Memphis, Tennessee, started as a carman-oiler at the St. Louis-San Francisco Railway in 1963. He rose through the ranks and moved to Burlington Northern and Illinois Central Railroad. He was President of Illinois Central when Canadian National acquired it in 1998, becoming chief operating officer and later CEO of Canadian National. He retired from the latter in 2009.

Shareholders voted in Ackman's entire slate of seven directors onto Canadian Pacific's board at its annual meeting on May 17. Along with Green and Cleghorn, four other directors opted not to stand for re-election that day.

Stephen Tobias, a rail industry veteran who was on Ackman's director slate, was named interim CEO after the meeting. Since then, two other Canadian Pacific board members, both directors under Green, have quit.

The company elected Paul Haggis chairman earlier this month.

"Following a thorough CEO selection process, the Board of Directors has endorsed and appointed Mr. Harrison as CP's president & CEO," said Haggis in a statement. (Reuters)