SPRINGFIELD, Ill. (NEXSTAR) — A federal judge for the Southern District of Illinois issued an injunction Friday afternoon, ruling the assault weapons ban as unenforceable.

Judge Steven McGlynn ruled the state cannot enforce the ban until the court can make a decision.

He cited past Supreme Court cases as the reasons for his ruling.

“The Supreme Court in Bruen and Heller held that citizens have a constitutional right to own and possess firearms and may use them for self-defense,” the judge wrote in his ruling. “[The ban] seems to be written in spite of the clear directives in Bruen and Heller, not in conformity with them.”

Illinois’ assault weapons ban was signed into law in January. The law faced criticism and constitutional challenges ever since. The law bans the sale of certain weapons and attachments. The court’s ruling will allow gun shops to sell these weapons and attachments, but all other measures like background checks and needing a FOID card are unaffected by this ruling.

A judge from the 7th Circuit US Court of Appeals previously denied an injunction earlier this month.

Rep. Bob Morgan (D-Deerfield), who sponsored the bill in the Illinois House, said he’s disappointed by the ruling but remains encouraged that other judges refused to pass the law.

“Since its enactment, this law has already prevented the sales of thousands of assault weapons and high-capacity magazines in Illinois, making Illinois communities safer for families,” Rep. Morgan said. “This is necessary and life-saving legislation, and we feel confident we will ultimately prevail in a higher court.”