Militants in western Pakistan bombed a bus carrying women university students on Saturday and then seized part of the hospital where survivors of the attack were taken, killing at least 12 people, officials said.
At least 19 were injured.
The gunmen in Quetta, the capital of Baluchistan province long plagued by sectarian violence, were holed up in the emergency ward of a hospital, engulfed in a firefight pitting militants against the security forces.
Television footage showed security forces surrounding the Bolan Medical Complex and a helicopter hovering overhead.
The attack in resource-rich Baluchistan was Pakistan's most lethal since the government of Prime Minister Nawaz Sharif took office last week.
The initial blast gutted the bus, killing 11 students, and another explosion went off soon after at the hospital, the city's largest. Television footage showed people fleeing the building in panic.
A senior local government official was killed in the hospital attack, the state television network reported.
Earlier, city police chief Mir Zubair Mehmood told Reuters that the students on the bus were from various ethnic groups, including the Hazara minority that has been the target of a series of bombings this year.
Saturday's attack was the biggest since bombings in the city at the start of the year killed almost 200 people, briefly drawing global attention to a growing campaign of victimization of the Hazaras by sectarian militants.
It was not immediately clear who was responsible for the attack, or whether it was aimed at the Hazaras.
The 500,000-strong community in Quetta has been subjected to an escalating campaign of shootings and bombings by Lashkar-e-Jhangvi (LEJ), a militant group dedicated to attacking Pakistan's Shi'ite Muslim minority, which includes the Hazaras.
Earlier in the day, suspected separatists killed a policeman and gutted an historic summer retreat used by Pakistan's founder Muhammad Ali Jinnah in a hill town in the province, days after a new government vowed to end a guerrilla war there.
Baluchistan, with large copper and gold deposits, is a vast province bordering Iran and Afghanistan. As well as sectarian violence, it has suffered a long-running armed independence movement, and what rights groups call a campaign of forced disappearances by security forces.