TROY, Ill. – In an early test for the controversial new law known as the SAFE-T Act, a Troy, Illinois, man accused of murdering his girlfriend will remain out of jail until trial.

The attorney for the murder suspect, Michael Perham, said he was not a threat to anyone.

It was Perham who called the police after he shot and killed his girlfriend. He acted in self-defense, his attorney said.

Perham, 52, walked into Madison County Court on Tuesday, not knowing if he was going to walk back out. The alleged crime happened 13 days before the Safe-T Act took effect last month, eliminating cash bail statewide in Illinois.

Perham was still able to post bail and go free after posting $100,000 cash on a $1 million bond that had been set by the court.

The state’s attorney filed a petition to have Perham sent back to jail with no bond under that new law. The petition says Perham fired eight shots at his long-time girlfriend, Maha Tiimob, with two bullets hitting her from behind.

“In our assessment, any time a life is taken by violent means, we think it’s appropriate to try to detain that person under our new rules,” Madison County State’s Attorney Tom Haine said. “We’re going to use whatever tools we have under our new system.”

The prosecution argued before Judge Neil Schroeder that Perham emptied his gun into an unarmed woman, that he kept a large stash of guns and ammunition at his home, and that prosecution witnesses thereby feared retribution.

Perham’s attorney, Jessica Koester, countered that his girlfriend repeatedly threatened to kill Perham just before the shooting, that he first tried to fend her off with pepper spray, and that he’s had no issues since posting bail.

The judge ruled for Perham, allowing him to remain free pending trial and ordering him to have “no communication at all with witnesses.”

“’If you see them out in public,’ the judge said, ‘turn around and walk the other way,’” Koester said.

The judge also ordered Perham to surrender his state FOID (gun owner’s ID) to Troy Police and that he not possess any firearms or ammunition.

Perham and Koester did not comment as they left court with what felt like a clear victory for the SAFE T Act, which holds that even murder suspects should be released before trial unless prosecutors convince a judge they pose a threat of harming someone or a great risk of fleeing and not showing up for trial.

“I respect Judge Schroeder,” Haine said. “I disagree with his determination in this case, but we’re all going to have to figure out this new world where the judge has a single option: detain or not detain.”

Perham’s trial is currently set for Oct. 30.