BOGOTA, Aug 3 (Reuters) - Colombia's majority state-owned oil company Ecopetrol's second-quarter net profit soared to 3.72 trillion pesos ($951 million), boosted by strong sales, the company said on Tuesday, compared with 25 billion pesos in the year-earlier period.

Earnings before interest, taxes, depreciation and amortization (EBITDA) rose to 9.43 trillion pesos, from 2 trillion pesos in the second quarter of 2020, Ecopetrol said.

As well as significant sales growth, the higher earnings reflect a weak comparative period that saw the company's finances battered by a combination of lower demand caused by the coronavirus pandemic and increased supply due to an oil price war last year.

"The strength of Grupo Ecopetrol's results during the quarter and in the year-to-date ... underline our capacity to generate sustainable value and respond opportunely, with agility, to current conditions," Chief Executive Felipe Bayon said in a statement, citing the impact of widespread protests and a third wave of coronavirus.

Anti-government protests ran for about six weeks earlier this year, with associated road blocks halting transport of goods around the country. As of early June, blockades had stopped production of some 1.5 million barrels of crude oil and 2.7 billion cubic feet of gas, according to the energy ministry.

Ecopetrol's second-quarter performance was above that of Mexican peer Pemex, which swung to a profit of around $722 million between April and June.

Total sales in the second quarter rose to 19.4 trillion pesos, from 8.44 trillion pesos a year earlier, Ecopetrol said.

Net profit in the first half of the year rose to 6.8 trillion pesos, from 158 billion in the year-earlier period, while EBITDA for the first six months climbed to 17.6 trillion pesos, from 7.25 trillion pesos in the first six months of 2020.

Production in the second quarter averaged 660,900 barrels of oil equivalent per day (boepd), down 2.5% year-on-year.

First half oil production was also down 5.3% at 668,400 boepd. However, the company maintained its production guidance range for the year of 690,000 and 700,000 boepd.

Bayon declined to give estimates for Ecopetrol's production level in the third and fourth quarter of the year, when asked by Reuters in a virtual press conference.

($1 = 3,913.59 Colombian pesos) (Reporting by Oliver Griffin and Julia Symmes Cobb; editing by Marguerita Choy and Richard Pullin)