QUETTA, Pakistan — Pakistani forces stormed a hospital that had been taken over by gunmen Saturday in a restive southwestern province, freeing hostages and ending a five-hour standoff that capped a series of attacks that killed 22 people.

The violence emphasized the challenges that new Prime Minister Nawaz Sharif will have in bringing calm to Baluchistan, a region beset by a separatist movement, Taliban militants and violent sectarian groups. Police said six attackers were also killed in the fighting.

The Baluch have long been alienated by what they see as exploitation by the central government of the oil, natural gas and valuable minerals in the extremely poor and underdeveloped province. The area has also been plagued by horrific attacks by Islamic militants on minority Shiite Muslims, and Afghan Taliban fighters use the territory's empty, arid landscape as a refuge.

The deadliest attack Saturday took place in the provincial capital of Quetta and appeared to target minority Shiites. A blast ripped through a bus carrying female university students, killing at least 14 people, said the head of police operations, Fayaz Sumbal.

The victims and bodies were rushed to a nearby hospital. As relatives, rescuers and government officials crowded into the building, a suicide attacker detonated explosives in the corridor leading to the emergency room, Sumbal said.

Other attackers then began firing at the crowd, prompting dozens to hide inside the hospital while others fled into the parking lot.

Soldiers and police commandos rushed to the scene and penned the attackers off into a wing of the hospital, Sumbal said.

An Associated Press reporter nearby heard intermittent gunfire as troops took up positions around the building. As fighting continued into the evening, another loud explosion later determined to be one of the attackers blowing himself up 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.

A high-ranking government official who had been visiting wounded in the hospital died in the blast, as did two nurses, said Sumbal.

Another four soldiers from the country's Frontier Corps 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.

Six of the attackers died during the siege – four killed by security forces and two others who blew themselves up, Sumbal said, adding that thirty people were wounded from their gunfire.

Lashkar-e-Jhangvi, a group of radical Sunni Muslims, who revile Shiites as heretics, claimed responsibility for the attack on the school bus and the hospital. The group said one of their female suicide bombers blew up the bus because it was carrying Shiites, although officials said the bus was also carrying students from other religious and ethnic groups.

The group has claimed responsibility for numerous attacks against Shiites, including a bombing in Quetta in January that killed 86 people.

Earlier Saturday, militants destroyed a house once lived in by Pakistan's founder, Muhammad Ali Jinnah, who led the country to independence in 1947. The attack has huge significance in a country where Jinnah is so revered he's referred to as Quaid-e-Azam or the "great leader."

Attackers on motorcycles planted bombs at the 19th century residence in the mountain resort town of Ziarat, about 120 kilometers (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.

Authorities said they were investigating reports that a Baluch Liberation Army flag had been hoisted at the residence. The militant group is one of the various factions fighting for independence from Pakistan.

"It's a symbolic attack on the idea of Pakistan," said Raza Rumi, director of the Islamabad-based Jinnah Institute.

UN Secretary-General Ban Ki-moon condemned the attacks in a statement, saying "no cause can justify such violence."

Saturday's violence serves as a huge challenge for Sharif and for the new chief minister of Baluchistan, Abdul Maalik Baloch.

Lashkar-e-Jhangvi is linked to al-Qaida and has been declared a foreign terrorist organization by the U.S., yet it operates with relative ease in Pakistan's populous Punjab province. The new Pakistani prime minister has been accused of being soft on militants using the province that his party has ruled for the last five years as a base.

Baloch's party was one of many that boycotted the 2008 provincial elections, but he and others decided to take part in the May 11 vote in an attempt to win change through the ballot box instead of through the violence favored by the separatists.

Ethnic Baluch separatists sought to derail the vote with a campaign of violence targeting their fellow Baluch, who the separatists view as traitors for taking part in the vote.

Many of the Baluch also view Pakistani security forces with deep distrust as a result of a repressive campaign against separatists by paramilitary soldiers and intelligence agents.

__

Santana reported from Islamabad. Associated Press writer Zarar Khan in Islamabad contributed to this report.

Also on HuffPost:

Loading Slideshow...
  • Pakistani Women mourn next to the body of a child, who killed in the Saturday's bombing, during a funeral in Karachi, Pakistan, Sunday, May 5, 2013. Two blasts in Pakistan's southern city of Karachi killed three people on Saturday, May 4, 2013, near the office of a political party critical of the Taliban, heightening tensions ahead of the country's historic May 11 election. (AP Photo/Fareed Khan)

  • Pakistani women mourn their family member, who was killed in a Saturday bombing, during his funeral in Karachi, Pakistan, Sunday, May 5, 2013. Two blasts in Pakistan's southern city of Karachi killed three people on Saturday, May 4, 2013, near the office of a political party critical of the Taliban, heightening tensions ahead of the country's historic May 11 election. (AP Photo/Fareed Khan)

  • Supporters of Pakistan Tehreek-e-Insaaf (PTI) or Movement for Justice party wave party flags as they take part in an election campaign rally in Lahore on May 5, 2013. A roadside bomb exploded at an election rally in southwest Pakistan on Sunday killing two people, officials said as violence continued ahead of historic polls on Saturday. (Arif Ali/AFP/Getty Images)

  • Supporters of former Pakistani Prime Minister Nawaz Sharif wave party flags as they listen to Sharif's addresses during an election campaign meeting in Islamabad on May 5, 2013. (AAMIR QURESHI/AFP/Getty Images)

  • A Pakistani man who was injured in an attack targeting an election office run by the Muttahida Quami Movement, receives treatment at a hospital in Karachi, Pakistan, Tuesday, April 23, 2013. (AP Photo/Shakil Adil)

  • In this Tuesday, April 23, 2013 photo, Pakistani police officers gather at the site of an attack, in Karachi, Pakistan. In the southern city of Karachi, unknown assailants threw a homemade bomb at an election office run by the Muttahida Quami Movement, killing two people and wounding many, police officer Amir Farooqi said. (AP Photo/Fareed Khan)

  • Pakistani police officers and army soldiers, gather at the site of a bomb explosion in Banjot village near Mingora, Pakistan, Sunday, April 14, 2013. Pakistani Taliban attacked two leaders of an anti-militant political party on Sunday in northwest Pakistan, killing one and wounding another in the latest attack targeting members of secular-leaning parties during their campaigns for next month's parliamentary election. (AP Photo/Naveed Ali)

  • Pakistani relatives of a bomb explosion victim, carry his body for burial, in Banjot village near Mingora, Pakistan, Sunday, April 14, 2013. (AP Photo/Naveed Ali)

  • A police officer and army soldiers examine a damaged vehicle at the site of bomb explosion in Banjot village near Mingora, the main town of Pakistan's Swat Valley, Sunday, April 14, 2013. (AP Photo/Sherin Zada)

  • Provincial assembly candidate Masoom Shah, center, who survived a roadside bomb targeting his convoy, rushes to a hospital to receive treatment in Peshawar, Pakistan, Sunday, April 14, 2013. Pakistani Taliban attacked two leaders of an anti-militant political party on Sunday in northwest Pakistan, killing one and wounding another in the latest attack targeting members of secular-leaning parties during their campaigns for next month's parliamentary election. (AP Photo/Mohammad Sajjad)

  • Provincial assembly candidate Masoom Shah, who was injured in a roadside bomb targeting his convoy, is wheeled on a stretcher from the emergency room to another section of a hospital in Peshawar, Pakistan, Sunday, April 14, 2013. (AP Photo/Mohammad Sajjad)

  • Pakistani relatives and volunteers carry the body of a slain election candidate, Saddiq Zaman Khattack, at a hospital mortuary in Karachi on May 3, 2013 following a gunmen attack. A candidate running for parliament in next week's historic Pakistani election was shot dead on Friday along with his three-year-old son after praying in a mosque in Karachi, police said. (ASIF HASSAN/AFP/Getty Images)

  • Relatives and supporters gather in front of the bodies of slain election candidate, Saddiq Zaman Khattack (top) and his younger son, Naseer Khattack 6, at a hospital mortuary in Karachi on May 3, 2013 following a gunmen attack. (ASIF HASSAN/AFP/Getty Images)

  • Pakistani activists of the secular Muttahida Qaumi Movement (MQM) party examine a damaged office after a bomb explosion in Karachi on May 2, 2013. (RIZWAN TABASSUM/AFP/Getty Images)

  • Pakistani activists of the secular Muttahida Qaumi Movement (MQM) party examine a damaged office after a bomb explosion in Karachi on May 2, 2013. (RIZWAN TABASSUM/AFP/Getty Images)

  • Pakistani policemen examine the site of a bomb explosion at the secular Muttahida Qaumi Movement (MQM) party office in Karachi on May 2, 2013. (RIZWAN TABASSUM/AFP/Getty Images)

  • Pakistani men help an injured bomb victim at a hospital following an attack on an election office of a political party in Quetta on May 1, 2013. An election candidate escaped unharmed Wednesday when a suicide bomber blew himself up in southern Pakistan wounding two passers-by, police said, in the latest in a wave of attacks to hit the campaign. (BANARAS KHAN/AFP/Getty Images)

  • A Pakistani cameraman takes footage of the dead body of a slain election candidate Abdul Fateh Magsi on a vehicle outside a hospital in Dera Allayar in Baluchistan province on April 30, 2013. A Pakistani election candidate was shot dead Tuesday in an exchange of fire with security forces at a checkpoint in restive southwestern Baluchistan province, officials said. (STR/AFP/Getty Images)

  • Pakistani volunteers search an election candidates office following a bomb attack in Peshawar on April 28, 2013. Two bomb attacks targeting the offices of election candidates in northwest Pakistan killed at least eight people, officials said, the latest bloodshed ahead of polls next month. (HASHAM AHMED/AFP/Getty Images)

  • A Pakistani man looks at the destroyed office of an election candidate fallowing a bomb attack in the city of Kohat, adjacent to Pakistan's restive tribal areas along the Afghan border on April 28, 2013. (BASIT GILANI/AFP/Getty Images)

  • Pakistani people gather at a political party office a day after bomb attack, in Karachi on April 28, 2013. (ASIF HASSAN/AFP/Getty Images)

  • Pakistani people gather at a political party office a day after bomb attack, in Karachi on April 28, 2013. (ASIF HASSAN/AFP/Getty Images)

  • Pakistani security officials, journalists and local residents gather at the site of a bomb explosion in Karachi on April 27, 2013. (ASIF HASSAN/AFP/Getty Images)