ABU DHABI (Reuters) - U.S. buyout firm Carlyle Group has agreed to buy between 30 and 40 percent of Spanish energy company Cepsa from Abu Dhabi state investor Mubadala, valuing the stake at as much as $4.8 billion.

A Cepsa pump is seen during Expo AutoGas, a liquefied petroleum gas (LPG) fair, in Madrid, Spain, June 15, 2018. REUTERS/Susana Vera

The transaction marks the successful end of a quest by Mubadala for a new partner in Cepsa after it pulled the Spanish group’s stock market flotation last year, citing uncertainty in international capital markets.

Mubadala said on Monday the deal gave Cepsa a total enterprise value of $12 billion.

Reuters had reported in March that Carlyle, with $216 billion of assets under management as of December, was ahead of other contenders to buy a 30 percent stake in Spain’s Cepsa for up to 3 billion euros ($3.4 billion).

Mubadala said the deal is expected to complete by the end of 2019, pending regulatory approval, and the final stakes of both parties will be confirmed at that time.

“We now look forward to working in partnership with Carlyle, which has a significant track record and energy sector capabilities, and with Cepsa’s management to further enhance and grow the business,” said Musabbeh al Kaabi, Mubadala’s chief executive, Petroleum & Petrochemicals.

Mubadala, with assets of $225 billion including a stake in Carlyle, will remain the majority shareholder of Cepsa.

Madrid-headquartered Cepsa is Europe’s largest privately-owned oil and gas company. It reported a 15 percent fall in annual adjusted net profit to 754 million euros last year.

Rothschild was sole financial advisor to Mubadala while HSBC and J.P. Morgan advised Carlyle.

Equity for the Cepsa investment will come from Carlyle International Energy Partners I and II, Carlyle Partners VII, and Carlyle Europe Partners V and co-investors.