ROSELLE — A judge declined prosecutors' request to detain a New Jersey man charged with aggravated assault in April, two months before he killed a woman and then himself.

Anishalee Cortes also had obtained a restraining order against Dominick Richards last month.

Authorities found their bodies Tuesday at Richards' home in Roselle.

Newark police arrested Richards on April 8 after Cortes said he had broken into her home and assaulted her at gunpoint. Police seized the gun and Richards was arrested on aggravated assault and weapons charges.

Acting First Assistant Essex County Prosecutor Robert Laurino said Thursday his office filed a motion seeking to have Richards detained, but a judge ordered him released on the condition he didn't contact Cortes or possess a firearm.

Richards was released under the state's new bail reform laws, which make it easier for criminal defendants to get out of jail while awaiting trial, but also makes it easier for judges to keep potentially dangerous defendants locked up without bail.

Critics of the previous rules said the system favored wealthy defendants and did not allow courts to consider the safety of the community. But opponents of the new rules, including law enforcement officials and bail bondsmen, say too many accused criminals are being released only to commit more crimes shortly thereafter.

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.