The bomber detonated his explosives outside a mosque in Quetta where police officers were offering prayers for their colleague who had been gunned down, reported Reuters. Of the 30 who died, 21 were police officers. At least 62 people were injured.
The Taliban claimed responsibility for the attack.
"We killed the station-house officer and then we targeted the funeral to kill the other officers," Taliban spokesman Shahidullah Shahid said.
He said the Taliban carried out the attack in revenge for the arrest and mistreatment of their fighters.
The attack, captured live on cameras, showed mourners and journalists running away from the mosque.
A Reuters reporter described the tragic scene:
Weeping policemen wandered among the blood and body parts, looking for colleagues, or sat in shock amid abandoned shoes and other belongings.
This is one of several attacks in Pakistan since Prime Minister Nawaz Sharif's government was voted to power in May.
"They are not Muslims. They are not humans," Inspector General Mushtaq Sukhera said.
"We have no other option but to fight against terrorists," he added. "We have made sacrifices and we will continue to do so and we will not bow down."