After weeks of squabbles, CSX (CSX) - Get CSX Corporation Report on Monday evening agreed to install railroad veteran Hunter Harrison as its chief executive as part of a long-awaited -- but still blockbuster -- settlement with activist investor Paul Hilal and his newbie fund, Mantle Ridge.

The activist hedge fund has been hounding CSX for weeks to install Harrison as CEO as well as a handful of dissident director candidates to the railroad company's board and the two sides have been squabbling over the length of Harrison's contract, the size of his pay and the number of Mantle Ridge-backed directors that would get installed.

In the deal, CSX agreed to install Harrison with a four-year contract and appoint five new directors that were approved by both CSX and Mantle Ridge, including Harrison, Hilal and three others. In addition, three incumbent directors are expected to step down before the 2017 annual meeting, bringing CSX's board size to 13. 

"I am proud to join the dedicated and talented railroaders at CSX," Harrison said in a statement.

TheStreet Recommends

As CEO, Harrison said he will focus oversee and implement an operating approach he pioneered-and is famous for-known as precision scheduled railroading, a strategy that allows the railroad company to schedule shipments in a precise way by knowing how trains move between customers and interchanges. "Together, we will implement Precision Scheduled Railroading - a model proven to improve safety, create better service for customers, produce a proud and winning culture for employees, and generate exceptional, lasting value for shareholders," Harrison said. 

Also, CSX shareholders will have a chance to vote on parts of Harrison's compensation package, at the railroad company's 2017 annual meeting. The shareholder vote will be nonbinding. However, a strong negative vote could have the impact of pushing a renegotiated compensation package. 

The settlement came after CSX late last month announced plans for the resignation of its chief executive, Michael Ward. Also, the Jacksonville, Fla.-based railroad also announced that roughly 1,000 management positions are expected to be eliminated at both the company's headquarters and field operations.

A key sticking point had involved the number of Mantle Ridge supported directors that could join the board. In a letter on Feb. 16, Hilal suggested that if the board could agree to a four-year contract for Harrison, he would agree to a deal that only involved the installation of himself, Harrison and three other directors to what would be a reconstituted 14-person board. Hilal's previous proposal had sought six seats on the CSX board, including seats for himself and Harrison. 

Some directors could be good targets for replacement. The company's current 12-person board has at least six non-executive directors that have served for terms of more than ten years, according to relationship mapping service BoardEx, a service of TheStreet. For example, CSX directors David Moore Ratcliffe, Edward Joseph Kelly III, and Donald James Shepard have all served more than 13 years on the railroad company's board.

Hilal, an ex-partner at activist fund Pershing Square Capital Management LP, recently joined forces with Harrison, who in January quit his position as CEO of Canadian Pacific Railway (CP) - Get Canadian Pacific Railway Limited Report . The duo, together with Pershing Square's Bill Ackman, are well known for engineering a spectacularly successful insurgency in 2012 that led to Harrison's installation as CEO at Canadian Pacific and a turnaround that helped Canadian Pacific's Toronto-listed shares climb nearly 190% during his tenure.