Johannesburg, South Africa (CNN) Eighteen people were killed and more than 250 injured Thursday when a train collided with a truck in South Africa, officials said.

The train was traveling from Port Elizabeth to Johannesburg when the collision occurred, causing a fire to break out in one of the carriages and then spread to others, said Russel Meiring, a spokesman for ER 24, one of the country's private medical emergency services.

Mthura Swartz of the Passenger Rail Agency of South Africa (PRASA) said 18 people were confirmed dead and 254 were injured. The train had capacity for 780 passengers and there were 758 on board. Most of the deaths were the result of the fire that spread through the rain, Swartz said.

Rescue workers are seen at the site of a train crash Thursday between Hennenman and Kroonstad.

The death toll was expected to rise as rescuers put out small fires that continued to burn in some of the carriages, he said. Emergency services are still working on freeing people from overturned carriages.

Meiring earlier said about 100 people were injured, some of them seriously.

Read More