Pakistani police stormed a hospital that had been taken over by gunmen, freeing hostages and ending a five-hour standoff that began with a bombing just outside the emergency room and left five dead, officials said.
The attack in Quetta, capital of restive Baluchistan province, came just after another blast ripped through a nearby bus carrying female university students, killing at least 11 people and wounding 19, police chief Mir Zubair Mahmood said.
Soldiers and police commandos had rushed to the scene of the attack, where five to seven gunmen had taken over different sections of the building, head of police operations, Fayaz Sumbal, said.
Security forces later managed to pen the attackers off into a certain area, Sumbal added, as helicopters hovered overhead to keep the assailants off the rooftops. Officials said at least four of the attackers died during the final assault by police.
An Associated Press reporter outside the hospital as the attack unfolded heard intermittent gunfire as troops took up positions around the building. Later, as fighting continued into the evening, another loud explosion shook the hospital. Inside, patients, visitors and staff hiding behind locked doors spoke of the firefight.
"Everybody is trying to take shelter - in the corners, behind the steel cupboards and tables," Hidayatullah Khan, who had been visiting a niece wounded in the earlier bus bombing, told the AP by telephone.
"Some armed people are roaming around but we closed the door and locked it," he added. "We have been hearing shots for some time."
Sumbal said the initial explosion at the hospital went off as rescuers and relatives of the victims from the bus bombing crowded the emergency room where the dead and wounded were taken.
A top government official who had been visiting the wounded female students died in the hospital blast, officials said.
Another four Frontier Corps troops also died, said Interior Minister Chaudhry Nisar Ali Khan. But it was not clear whether they were killed in the explosion or in the ensuing operation to clear the building. He said at least 35 people trapped inside the building were freed.
Besides the four attackers killed, one was in custody, the minister added.
Two of the attackers blew themselves up as security forces were closing in on them, said Mahmood, the Quetta police chief. He said security forces were now going methodically through the building to make sure no more attackers were left inside.
No one immediately claimed responsibility for the hospital attack or bus bombing, although the vast Baluchistan region has been plagued by violence from Baluch nationalists, sectarian militant groups and the Taliban.
A spokesman for the Baluchistan government, Jan Mohammad Buledi, told Pakistan's Geo TV that the two attacks were connected. Militants often stage coordinated attacks to target rescuers and others as they rush to the hospital.
Footage on Pakistani television showed people fleeing from the hospital after the explosion and hiding behind ambulances in the parking lot.
Earlier Saturday, militants destroyed a house once lived in by Pakistan's founder, Muhammad Ali Jinnah, who led the country to independence in 1947.
Attackers on motorcycles planted bombs at the 19th century residence in the mountain resort town of Ziarat, about 120 kilometres (75 miles) north of Quetta. Three of the bombs exploded and ignited a fire that destroyed the building, said senior police officer Asghar Ali Yousufzai.
The attackers also shot dead a police guard outside the residency, which had been turned into a museum about the man many Pakistanis call Quaid-e-Azam, or "great leader."
Prime Minister Nawaz Sharif condemned the attack in a statement and expressed his sorrow over the policeman's death.