KARACHI, Pakistan (AP) — A Pakistani court has granted bail to three owners of a garment factory in the southern city of Karachi where a fire this week killed 258 people, a defense lawyer said Friday.

Amir Mansoob Qureshi said the judge instructed the police that the factory owners cannot be arrested for eight days under bail terms. The court also asked the owners to surrender their passports and ordered them not to leave the country, the lawyer said.

Pakistani police have opened a murder case and are investigating whether possible negligence by the owners and managers of the garment factory led to the massive loss of life.

The fire that broke out Tuesday night was the deadliest industrial accident in Pakistan's 65-year history, and highlighted the woeful safety conditions that exist at many factories around the country.

The horrific way the factory workers died has infuriated many Pakistanis. People caught in the basement suffocated when it filled with smoke while those on the higher floors were forced to break through metal bars over the windows and jump for their lives to the ground below.

Panicked workers had only one way out since the factory's owner had locked all the other exit doors in response to a recent theft.

The fire started when a boiler exploded and the flames ignited chemicals that were stored in the factory, which manufactured jeans and other clothes for export.

Meanwhile, security officials briefly arrested the son of the recently ousted Pakistani prime minister Friday for his alleged role in helping two pharmaceutical companies obtain huge amounts of ephedrine for drug trading, his lawyer said. He was taken into custody just before he was to appear at a hearing before the Supreme Court.

The arrest and immediate release of Ali Musa, the son of former Prime Minister Yousuf Raza Gilani, is another example of the festering standoff between Pakistan's powerful military and an increasingly activist court that has been using its influence to hold Pakistan's political and military leaders to account.

Officers from the anti-narcotics force, a military-backed law enforcement agency, arrested Ali Musa at the Supreme Court gates on Friday, said Musa's lawyer, Khalid Ranjha.

The arrest warrant was issued in June, but Musa has been in hiding. He was supposed to appear in front of the court to see whether he could receive bail. But before he could get there, police threw him in a vehicle and sped away, the lawyer said.

The court then demanded he be released, which authorities did.

Ranjha said the judges reprimanded officers for arresting Musa at a time when he was trying to surrender himself.

The judges granted bail in the case until Sept. 25.

Gilani's son is accused of using his political influence in 2010 to get the ephedrine for two pharmaceutical companies. They are suspected of diverting it to people in the drug trade. Ephedrine can be used to make methamphetamines.

Musa has denied the charges.