Three coaches and the engine derailed, while two were overturned.
About 200 polio workers and officers have been killed since 2012 when the first attacks were launched.
The group demanded a prisoner exchange and threatened to kill hostages if the operation continued.
This resulted in the death of at least 26 people ahead of the country’s general election, officials said.
Mr Uddin said it wasn’t immediately known if it was suicide bombing or a planted device went off.
According to government figures, around 4.4 million Afghan refugees live in Pakistan, 1.7 million of them without valid documents.
Local reports said the incident occurred in the province of Balochistan as the community came together to observe this significant religious occasion.
Pakistan is responsible for less than one per cent of global carbon emissions but is among the top 10 most climate-vulnerable nations.
Authorities declared a national emergency as death toll from the months of flooding continues to rise.
The preliminary investigations suggested bad weather had caused the crash.
