Indonesian firefighters on Wednesday extinguished a large blaze at one of the country's biggest oil refineries that had been burning for more than two days after an explosion.

Crews blasted fire-suppressing foam to quench the flames at two storage tankers after the inferno seriously injured at least six people early Monday.

Thick plumes of black smoke shot into the sky at the Balongan refinery in West Java, owned by state oil company Pertamina.

Thick plumes of black smoke shot into the sky at the Balongan refinery in West Java, owned by state oil company Pertamina
Thick plumes of black smoke shot into the sky at the Balongan refinery in West Java, owned by state oil company Pertamina AFP / Agus Sipur

The huge fire was eventually put out on Wednesday afternoon, the firm said.

"(The company) will continue to cool and monitor the tanks," Pertamina spokesman Agus Suprijanto said.

"Hopefully the cooling process will go smoothly and we can resume operations."

A massive fire rages for a second day at one of Indonesia's biggest oil refineries. Four oil storage tanks are in flames at the Balongan refinery in West Java, owned by state oil company Pertamina, after an explosion on Monday morning. At least six people
A massive fire rages for a second day at one of Indonesia's biggest oil refineries. Four oil storage tanks are in flames at the Balongan refinery in West Java, owned by state oil company Pertamina, after an explosion on Monday morning. At least six people were severely injured in the incident, police said. AUDIO NETWORK / Razya KIKI

About a thousand locals have been evacuated from the area.

The cause of the fire was not clear, but the company said the blaze began during a lightning storm.

Six severely wounded people have been hospitalised in the capital Jakarta, about 200 kilometres (120 miles) from the sprawling plant, which opened in the mid-1990s and can refine about 125,000 barrels of oil a day.

At least 30 others sustained minor injuries.

Pertamina has insisted the fire is not likely to cause fuel supply disruptions due to a high volume of stock.