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 of Tabasco.

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 the four dead workers and issued orders to conduct a “thorough and appropriate investigation” to establish responsibility and “avoid this type of accident in the future.”

An employee of a Pemex contractor who escaped the burning platform in a boat said he had witnessed other workers jumping into the sea “out of desperation and panic,” the local news media reported.

The injured workers, two of them in serious condition, were being treated in a nearby hospital at Ciudad del Carmen.

Despite the assurances that the fire had not caused a significant spill, environmental organizations issued statements expressing concern. Mexico’s worst oil spill in the Gulf was in 1979, when an explosion of an offshore rig leaked 140 million gallons of oil over nine months.