Islamabad, Pakistan (CNN) -- A court order issued Monday blocks five Americans arrested in Pakistan last week from being deported or being handed over to the FBI, officials said.
"All the government functionaries, including federal government or provincial governments are directed not to hand over the alleged detainees [Americans] to any American agencies, or any other foreign agencies," the order said, according to Faisal Zaman, attorney for the government of Pakistan's Punjab province.
The five were arrested Wednesday amid suspicion that they were plotting terrorist attacks. They were transferred Saturday from Sargodha, a small town where they were seized, to a more secure location in Lahore, police said.
The court order was a response to a petition from Khalid Khawaja, a former Pakistani intelligence official and founder of an organization called Defense of Human Rights of Pakistan. Under Pakistani law, any citizen can file a petition with a court.
The Lahore High Court scheduled a hearing for Thursday and ordered the government to respond to Khawaja's petition.
A police report on the interrogation of the American suspects, dated Thursday, focused on one identified as Ahmed Abdullah Minni, a 20-year-old born in Virginia.
The report said he regularly goes online to watch attacks on the U.S. military in Afghanistan and that he left comments praising the actions. That caught the attention of militants, and he eventually was contacted by a person named Saifullah, the report said.
After contact had been made, a Yahoo e-mail account was set up so the men and militants could communicate, the report says. E-mails were never sent from the account, but people would leave messages in the draft section of the e-mail account and delete them after reading them, the Pakistani police report said.
"This mode of communication enabled them to pass on messages without fear of interception by the FBI," the report said.
It said the suspects made a plan with Saifullah to go from Pakistan to Afghanistan. They gathered in Karachi and left for Hyderabad on December 1.
They tried to hook up with two militant groups, Jaish-e-Mohammed and the Jamaat-ud-Dawa, but neither of them showed interest.
The FBI said Pakistani authorities detained the men -- four of whom it said were found to have American passports.
Along with Minni, there were snapshots and brief profiles of four others -- Umar Farooq, Aman Hassan Yemer, Waqar Hussain Khan and Ramy Zamzam -- all from the Washington area.
Police in Sargodha took a sixth man -- Khalid Farooq, father of Umar -- into custody, and he was undergoing questioning at a safe location.
Authorities have said Khalid Farooq has not been considered a suspect.
CNN's Samson Desta and Nasir Habib contributed to this report.