A gasoline tanker ship belonging to Mexico's national oil company exploded Tuesday after a spark came into contact with fuel at a port in the gulf state of Veracruz, officials said. At least eight people were killed and nine injured.

Authorities evacuated 400 workers from Petroleos Mexicanos' Pajarito marine terminal in the city of Coatzacoalcos, company spokesman David Lartundo and civil protection official Daniel Martinez told The Associated Press.

Lartundo told reporters at the scene that the explosion occurred while the ship was unloading gasoline. He said a spark from welding work on one of the tanker's cranes came into contact with the gasoline and caused the blast. He said the ship was still on fire Tuesday afternoon.

In a news release, Petroleos Mexicanos, or Pemex, said the ship was empty of fuel and out of service at the time of the explosion, but that a spark produced by repair work on the crane came into contact with residual gasoline left in the tanker.

The discrepancies could not immediately be resolved.

The company's news release said the blast killed three Pemex workers, three workers from repair company Lopez Garcia and two others who had not yet been identified. Nine more people were hospitalized for injuries, four of them minor, the company said.