QUETTA - Weeping relatives gathered Sunday to identify the charred remains of loved ones killed in a double attack in Quetta claimed by a banned militant group.

At least 25 people were killed on Saturday when militants blew up a bus carrying female students in Quetta and then stormed a hospital where survivors had been taken for treatment.

The extremist sectarian outfit Lashkar-e-Jhangvi (LeJ) said it was behind both attacks. An LeJ spokesman said a female suicide bomber struck the bus - a rare tactic in Pakistan - before gunmen attacked the hospital, claiming the strikes were revenge for an operation by security forces earlier this month.

Militants occupied parts of the Bolan Medical Complex in a standoff that lasted several hours and ended when security forces stormed the building, freeing 35 hostages.

Authorities shut down the hospital on Sunday, moving patients to another facility, as investigators combed the grisly aftermath of the violence.

"All patients were shifted from here overnight. Inside I have seen blood and small pieces of human flesh," a security official at the locked gates told AFP.

The intensity of the blast and subsequent fire reduced the student bus to a blackened skeleton, and outside the mortuary of the Provincial Sandeman Hospital on Sunday, weeping relatives gathered to identify bodies amid a strong stench of burnt human flesh. The state of the bodies added confusion to the relatives' burden of grief as some were given contradictory information about their loved ones.

Mohammad Hamza, 19, said that on Saturday he had been given the body of his student sister, only to be told a mistake had been made.

"I came here after someone had given us the information that we had taken the wrong body and my sister's body was still here at hospital, but it is not true," Hamza told AFP. It appeared the body he was given on Saturday was indeed his sister.

Mohammad Yasir, deputy registrar of Sardar Bahadur Khan Women's University, said DNA testing may be needed to identify many body parts.

A witness caught in the hospital during the shootout described hiding during the terrifying ordeal. "The firing was so intense that I thought that my time (to die) has come and I started reciting verses from the Holy Quran," Ali Gul, 35, said.

"Some patients cried and begged the gunmen to spare them. The gunmen told them to keep quiet and said they were only killing security forces." LeJ spokesman Abubakar Siddiq called newspaper offices in Quetta late Saturday to claim the killings, saying the attacks were retaliation for a raid by security forces.

At least three militants and two women were killed during a security operation at a house in the Kharotabad neighbourhood of Quetta. Officials said they belonged to Tehreek-e-Taliban Pakistan, with whom LeJ has links.