A four-month battle for control of Oklahoma City–based SandRidge Energy has ended with the embattled oil and gas exploration company reaching a deal with activist hedge fund TPG-Axon Capital Management that could lead to SandRidge CEO Tom Ward‘s ouster by June 30.

Under the terms of the agreement announced Wednesday, SandRidge has agreed to add four seats to its board of directors and fill those spots with nominees put forward by TPG-Axon, which owns a 7.3 percent stake in the energy company. TPG-Axon had been pushing to replace the entire board.