Image copyright AFP Image caption The explosion appeared to target the convoy of a senator, Abdul Ghafoor Haideri

At least 25 people have been killed in an explosion in Pakistan's Balochistan province which appears to have targeted a top lawmaker.

The blast hit a convoy carrying Senator Abdul Ghafoor Haideri, the deputy chairman of Pakistan's upper house, as it left a religious school in Mastung.

More than 40 other people were injured in the blast.

The so-called Islamic State (IS) militant group said it carried out the attack using a suicide bomber.

Mr Haideri was on his way back to Quetta after presenting graduation certificates to students at the religious school when the blast happened.

He told Reuters news agency he had sustained minor injuries.

"There are many casualties as there were many people in the convoy," he said.

The most severely injured were airlifted to hospital in the provincial capital, Quetta.

Mr Haideri represents the Jamiat Ulema-e-Islam Fazl (JUI-F) party, a Sunni Islamist party that is part of the ruling coalition.

Most of those injured or killed were party workers, Pakistani media reports said. A police official said Mr Haideri's driver was among the dead.

The statement from IS came via its self-styled news agency, Amaq.

The group also carried out an attack in Balochistan in November 2016 on a remote Sufi shrine, killing more than 50 people.

Three months later, more than 80 people died in a suicide attack on a Sufi shrine in Sindh province that IS said it carried out.

Balochistan is Pakistan's poorest and least developed province. Separatist militants have been fighting the government there for decades and many other attacks have been attributed to Sunni Muslim extremist group Lashkar-e-Jhangvi.