Huge fireballs illuminated the early dawn skies of the Gulf of Mexico on Wednesday as an explosion and fire killed four people and injured as many as 16 others on a large oil platform in the southeastern Bay of Campeche, Mexican officials said.

At least eight fire boats battled the sheets of flame soaring high above the wreckage of the shallow-water Abkatun-Permanente platform in Campeche Sound. The platform’s chief function is to separate gas and oil before it is pumped to onshore refineries.

In a statement, Mexico’s state-run oil company, Pemex, which owns the huge oil rig, said that there was no evidence of a major spill, but that the blast had forced the evacuation of more than 300 workers from the rig in seas off the southern state ofTabasco.

The platform is part of the Abkatun-Pol-Chuc offshore field, which produced 300,000 barrels per day in 2013.

Reports of the explosion came as Pemex, like oil companies and oil-producing states all over the world, has been forced to adjust to the global plunge in petroleum prices. At the same time, Pemex has been trying to lure foreign investment as part of President Enrique Peña Nieto’s effort to bolster the country’s economy through the development of new oil and gas fields.

The explosion also raised questions, once again, about the company’s safety record. Only two years ago, a blast at Pemex’s Mexico City headquarters killed 37 people. In 2007, a fire at the Kab 121 rig in Campeche Sound killed 21 workers.

Mr. Peña Nieto sent his condolences to the families of