BOGOTA, Aug 11 (Reuters) - Colombia's majority state-owned oil company Ecopetrol has agreed to buy the government's 51.4% stake in conglomerate ISA for 14.2 trillion pesos ($3.58 billion), the company said on Wednesday.

Ecopetrol will purchase around 569.5 million ISA shares for 25,000 pesos each from Colombia's finance ministry, it said.

The signing of the deal comes at a time when the Andean country faces fiscal pressures caused by the impact of the coronavirus pandemic and will provide resources to meet the those needs, while furthering Colombia's energy transition, Finance Minister Jose Manuel Restrepo said.

"The acquisition is one of the most important operations in the country's recent history, contributing to the energy transformation and the reactivation of the economy," Restrepo said at a press conference.

Ecopetrol submitted its offer to buy the state's holding stake in ISA at the end of January as part of its strategy to become a comprehensive energy company.

"Ecopetrol has the financial strength to access this type of resources," Ecopetrol's Chief Executive Felipe Bayon said at the conference, adding that details concerning a loan to support the takeover would be revealed later.

Bayon previously estimated buying ISA would cost between $3.5 billion and $4 billion.

Last week, Ecopetrol reported soaring second-quarter net profit of 3.72 trillion pesos, boosted by strong sales growth, compared with 25 billion pesos in the year-earlier period, which was battered by the coronavirus pandemic and increased supply due to an oil price war.

The deal is to close by December 6, but efforts are being made to complete the transaction in the coming weeks, Bayon said.

Ecopetrol is Colombia's largest company. It produces most of the South American country's oil and owns the two most important refineries, as well as most of the pipeline network.

ISA owns operations in energy, roads, and telecommunications in Colombia, Brazil, Chile, Peru, Bolivia, Argentina and Central America through 51 affiliates and subsidiaries.

($1 = 3,979.80 Colombian pesos) (Reporting by Oliver Griffin and Luis Jaime Acosta; Editing by Richard Pullin and Raju Gopalakrishnan)