An explosion at a pipeline belonging to state-owned oil giant Petroleos Mexicanos, or Pemex, injured at least seven people on Sunday, officials and media reports said.

The blast may have occurred when people tried to illegally tap the pipeline, Pemex said.

The spill of crude oil and explosion happened on the Nuevo Teapa-Venta de Carpio-Tula pipeline in Tonanitla, a city in Mexico state, which surrounds the Federal District and forms part of the Mexico City metropolitan area, Pemex said in a post on social-networking sites.

"The flow of crude in the pipeline was immediately halted. Indications are that the incident may have been due to a clandestine tap," Pemex said.

The state-owned energy company did not provide injury figures, but media outlets said seven people were hurt in the blast.

The injured were municipal police officers and emergency services personnel who responded to the explosion and fire, Tonanitla Mayor Miguel Martinez said.

The fire has been extinguished, Pemex said.

Theft of fuel from Pemex pipelines, known in Mexico as "milking," is common, with both individuals and organized crime groups involved in the illegal activity. EFE