Medco's offer of 55 pence per Ophir share came after Ophir rejected a previous $437 million, or 48.5 pence per share, potential buyout offer this month, saying it undervalued the company.

Jakarta-headquartered Medco will become the seventh largest non-national upstream oil producer in Southeast Asia after the deal, according to research firm WoodMac.

Ophir's market value has collapsed over 91 percent since the shares peaked to 566.4 pence in 2012. More recently, the company struggled to fund its major liquefied natural gas project in Equatorial Guinea and then lost its licence for the project, prompting warnings of a $300 million write-down for the full year.

London-listed Ophir's shares were up 6.5 percent on Wednesday while Medco shares were up 11.2 percent on the Indonesia stock exchange.

"The benefit from my perspective is that this enlarged, combined portfolio offers a more balance set of assets from exploration development to producing assets. Now it is within this that we will identify some organic growth opportunities," Medco Chief Executive Roberto Lorato told Reuters.

The company said it would review Ophir's assets, which may lead to it selling off some non-core parts of the business.

Medco, which earns the bulk of its revenue from oil and gas operations, mainly in Indonesia, will also gain access international assets in Tanzania and Mexico through the deal.

Founded by oil and gas tycoon Arifin Panigoro, Medco has made sizeable acquisitions in recent years, including leading a $2.6 billion acquisition of the Indonesian unit of Newmont Mining Corp in November 2016.

"Ophir's assets generate a lot of near-term cash and if Medco can borrow cheap, this gives them some room to grow the business further," said one source, who declined to be named as he was not authorized to speak to the media.

Wednesday's offer represents a 65.7 percent premium to Ophir's closing price on Dec. 28, the last trading day before Medco first announced a possible offer for Ophir.

Ophir plans to recommend that shareholders vote in favour of the deal.

Medco, which plans to fund the deal from existing cash and proceeds of a credit agreement, expects the deal to be immediately accretive in the first full year to its EBITDA and net income.

Standard Chartered Bank acted as financial adviser to Medco and Medco Global, while Morgan Stanley and Lambert Energy Advisory advised Ophir.

(Reporting by Arathy S Nair in Bengaluru and Anshuman Daga in Singapore; Editing by Shounak Dasgupta and Louise Heavens)

By Anshuman Daga and Arathy S Nair