CHESTER – Pennsylvania Gov. Tom Wolf violated the law when he called a lockdown on school students on Friday, a federal judge ruled on Tuesday, allowing the state to order the immediate release of some students.

The order included that no student be questioned or searched, a policy Wolf signed as governor in 2015.

Monday’s evacuation of nine of the 50 schools in the Pittsburg, the parts of eastern and southern Pennsylvania that contained the lockdown did not help the person who was under suspicion of being a dangerous child, Jim Reeves, chairman of the attorney general’s child protection division, said in a court filing. “The district’s schools also did not have enough resources to secure the schools and secure the children,” Reeves said.

Reeves and other government officials had told the judge that students could return to school on Tuesday or Wednesday, but only if their parents “agreed upon the restrictions,” according to the court filing.

The court on Tuesday upheld one condition of the order, telling the state that everyone be released. But it temporarily halted all proceedings on that measure as the governor and attorneys from the state tried to get a hearing held at a courthouse in York. In a court filing on Monday, the state and the school district denied allegations that they were trying to hide the arrest of student Manasi Vickers in Lancaster city on Sept. 7 on several charges in a series of police-led raids. Vickers was “the suspected subject” of those raids, the state said, and the state should have provided information about them to the attorney general’s office.

The judge will likely rule by Thursday, a person familiar with the matter said. He said while federal court judges do not normally decide cases brought by the state, they “typically take an easier path” than state officials.