Mexico City (AFP) - Two workers were killed and at least seven injured Sunday in an oil platform fire off the coast of Mexico, state petrol company Pemex said.

The blaze broke out in a "compression area" on the rig located off the southeastern state of Campeche in the Gulf of Mexico, Pemex reported on Twitter.

It said nine injured workers were airlifted away for medical treatment and added later that two workers died.

The fire was brought under control and the platform did not need to be evacuated, Pemex added.

Two Pemex installations in the same area suffered explosions last year, one of which killed four people.

Pemex is a key source of income for Mexico's government. It has suffered lately from falling world oil prices and from theft of oil by criminal gangs.

The company's production plunged from 3.4 million barrels a day in 2004 to 2.2 million in early 2015.