Yesterday, Hess Corp. (NYSE:HES) and hedge fund Elliott Management finally ended their four month long proxy fight and reached an agreement on the board. The two sides resolved the issue only a few hours before shareholders started coming to attend Hess Corp. (NYSE:HES)’s annual investor meeting on Thursday. The oil company finally agreed to give Elliott three board seats to gain the hedge fund’s support for its five directors.

Hess Corporation

At the end of annual investors meeting, Hess Corp. (NYSE:HES) CEO John B. Hess walked up to Elliott Management activists John Pike and Quentin Koffey and expressed his happiness over reaching a settlement. Michael De La Merced of the New York Times gives the detailed behind the scenes story of how the two sides settled their bitter battle.

Elliott Attacking Hess

Earlier this year, the hedge fund revealed itself as one of the biggest shareholders of the oil company with 4.5 percent stake. Since then, Elliott has attacked Hess Corp. (NYSE:HES) time and again, saying that the oil company completely lacked board accountability and discipline for years. Elliott said that Hess Corp. (NYSE:HES)’ board was stuffed with cronies of the founding family, like former New Jersey governor Thomas H. Kean.

Elliott Management started demanding board seats for its nominees including Harvey Golub and Rodney F. Chase. The activist hedge fund demanded that Hess Corp. (NYSE:HES) be broken up into a domestic drilling business and an international oil exploration firm. All the activities of Elliott were aimed at pushing the oil company’s stock prices higher.

Hess Corp. (NYSE:HES) continued to reiterate that it is working on a turnaround plan that would improve shareholder value soon. Meanwhile, John B. Hess started announcing moves that were intended to push the stock prices, instead on working on the turnaround plan. These moves included stock buyback, dividend increase, and a sale of its gas stations. Hess Corp. also replaced the directors whom Elliott called the cronies of the founding family from re-election this year.

Though Hess Corp. (NYSE:HES) didn’t admit it publicly, it had started working in accordance with Elliott’s expectations. Hess Corp. later agreed to split the roles of chairman and CEO, which were both held by John B. Hess until now. On Thursday, the company named one of its directors Mark Williams as non-executive chairman. The Hess family, founders of the oil company also agreed to re-elect the directors every year, instead of every three years.

Until last week, there was no sign of the two sides resolving their differences. On Monday, Hess Corp (NYSE:HES) offered Elliott two seats for its director nominees if all the five candidates of the oil company were elected. But the hedge fund immediately rejected the offer. Then Mr. Hess called Elliott founder Paul Singer, and the two spoke for the first time.

Overnight Negotiation

The two sides started discussing the matter late Wednesday, people familiar with the matter told the New York Times. Initially, each of the sides discussed the matter separately with their team at the Four Seasons hotel in Houston. Hess Corp. (NYSE:HES), its proxy soliciting firm Mackenzie Partners, law firm Wachtell, Lipton, Rosen & Katz and advisers Goldman Sachs Group Inc. (NYSE:GS) gathered at the hotel bar and business center. While Elliott Management and its group including the proxy solicitor Okapi Partners and law firm Paul, Weiss occupied the conference room one floor above.

Until dawn, the two sides had negotiated the deal. Investors, completely unaware of what happened throughout the night, expected a fractious and tense shareholders meeting. But it went quietly and smoothly.

Hess Corp. (NYSE:HES) shares are up 1.03 percent to $69.83 at 10:00 AM EDT.