Ending a two year on-again off-again takeover battle, Hertz (HTZ) and Dollar Thrifty (DTG) have finally agreed on a buyout deal valued at $2.3 billion.

Under the terms of the agreement, Hertz will pay $87.50 a share in cash for Dollar Thrifty, creating one of the world’s largest car rental companies. The deal represents a premium of 8% to Dollar Thrifty’s closing price on Friday.

"We are pleased to have finally reached an agreement with Dollar Thrifty after a lengthy – but worthwhile – pursuit,” Hertz CEO Mark Frissora said in a statement.

Hertz and Avis Budget (CAR) have made several offers for smaller competitor Dollar Thrifty. However, regulators had long opposed a deal, fearing it would create too large of a car rental company in an industry that has gone through considerable consolidation and is now controlled by just a handful of large companies.

In a bid to win regulatory approval for the deal, Hertz agreed to sell its budget brand Advantage for an undisclosed amount of money. 

Shares of Tulsa, Okla.-based Dollar Thrifty climbed more than 7.4% and touched a 52-week high of $87.05 on Monday. Its shares have climbed nearly 174% since the beginning of April 2010 when Hertz first offered to buy it for $1.2 billion.

Hertz’s shares are up about 12.5% to $14.80, while those of Avis are up about 6.9% to $17.10. The two car rental companies, along with Enterprise Rent-A-Car, control about 75% of the market.  

As of June 30, Hertz and Dollar Thrifty together had $10.2 billion in sales and an EBITDA of about $1.8 billion across 10,000 locations globally. Hertz said it anticipates annual cost synergies of at least $160 million from the transaction.

The buyout, which will be structured as a two-step acquisition including a cash tender offer followed by a cash merger, ends a two-year standoff between the two and once and for all edges out rival Avis.

Avis and Park Ridge, N.J.-based Hertz had been in a bidding war for Dollar Thrifty since 2010. In September of last year, Avis finally scrapped its offer, leaving Hertz as the lone company vying to become Dollar Thrifty’s suitor.

Lazard (LAZ), Barclays (BCS), Bank of America Merrill Lynch (BAC) and Deutsche Bank (DB) are acting as financial advisors to Hertz.

Follow Jennifer Booton on Twitter at @Jbooton