Workers and relatives prepare for loading the body of a victim of a bomb explosion into an ambulance after receiving it from a hospital in Quetta, Pakistan, Sunday. AP-Yonhap

QUETTA, Pakistan — A powerful bomb exploded near a railway track as a train carrying passengers passed through the southwestern Pakistani city of Quetta on Sunday, wounding more than two dozen people, officials said.

The force of the explosion caused two of the train cars to overturn and catch fire, sending thick black smoke into the air, according to footage shared online.

The attack happened in an area where security forces are usually stationed, badly damaging several nearby buildings and smashing more than a dozen vehicles parked along the road, according to witnesses and images circulating on social media.

Doctors at local hospitals said they received more than 30 wounded people, several of them in critical condition.