Canadian Pacific Railway (CP) - Get Canadian Pacific Railway Limited Report late Wednesday reported earnings that missed expectations, but the real intrigue came with the railroad's announcement that its CEO would leaving early and could be headed to a competitor.

Calgary-based CP said that fourth quarter adjusted earnings per share came in at C$3.04, compared to the FactSet consensus estimate of C$3.12. The company also said that E. Hunter Harrison, who was brought in as CEO in 2012 by activist Bill Ackman, would retire ahead of schedule and be replaced by chief operating officer Keith Creel.

Harrison's abrupt departure rippled through the railroads, causing an after-hours spike in shares of rival CSX (CSX) - Get CSX Corporation Report .

Harrison, 72, had previously planned to retire in July, but the early move makes it sound like he is not done with the industry. CP said as part of the early separation it has agreed to a limited waiver of the executive's non-competition obligations in return for Harrison agreeing to terminate all roles with the company and forfeit "substantially all benefits" he was entitled to, including his pension, and cancel all vested and unvested equity awards.

CSX, which lost 3% of its value on Wednesday after reporting fourth quarter results that missed expectations, has previously been the target of merger overtures by Harrison, who had pledged to bring the company's costs in line with those of Canadian Pacific if he was able to take control. Shares of CSX jumped more than 7% after markets closed on speculation that Harrison could be headed there, either with Ackman or another activist or at the invitation of the board.

TheStreet Recommends

Shares of Norfolk Southern  (NSC) - Get Norfolk Southern Corporation Report, another railroad that was a target of Ackman and Harrison during their tenure at CP, also jumped 4% in after hours trading. 

Harrison, an industry veteran who was brought out of retirement by Ackman after the activist won a proxy fight against the company's board, has won high marks for his efforts to streamline operations. Canadian Pacific said fourth quarter expenses ate up just 56.2% of revenue; by comparison CSX has an operating ratio closer to 70%.

CP and other railroads struggled in 2016 due to low energy and commodity prices, but the industry had shown an uptick in volumes late in the fourth quarter that led to some hope that earnings might come in better than expected.

CP mentioned specific issues including extreme West Coast weather and a delayed grain harvest season for dampening fourth quarter results. Harrison in a statement noted that the company still generated C$1 billion in free cash flow for the full year and increased full-year earnings per share by 27% despite the economic headwinds.

"These are not excuses, but opportunities to showcase our operating ability and leadership," Harrison said. "As we have shown over the last four years, the precision railroading model works in all economic conditions."