The incident took place in Quetta, provincial capital of the restive Balochistan province, where a powerful blast derailed a passenger train and damaged the track, adjacent residential quarters and vehicles.
"At least 30 people were killed and 103 were wounded in the incident," said Hameed Ullah Shah, a local police official.
The number of dead is feared to increase.
He said the nature of the blast was not yet known and no group had claimed responsibility for the attack so far.
A state of emergency had been declared in all public and private hospitals in the city, a provincial government spokesman said.
He said at least three coaches and the engine had derailed after the explosion. Security forces had cordoned off the area and rescue operation was underway, he said.
Violence has surged in Pakistan recently and at least 25 terrorists were killed in north-western province of Khyber Pakhtunkwa in an overnight operation days after a terrorist killing of 15 policemen in a car bombing.
Last year, a train carrying hundreds of security forces and their families was hijacked by a banned militant group, the Balochistan Liberation Army (BLA).
At least two dozen passengers and soldiers were killed in a day-long rescue battle.
BLA is the largest of several militant groups fighting for the independence of Balochistan from Pakistan.
The group is behind the violence particularly targeting billion-dollar Chinese infrastructure projects.