A federal judge on Thursday upheld an assault weapons ban in Cook County.

A decision in the case “Wilson v. Cook County, et al.” was made in favor of Cook County by Judge Manish S. Shah in the Seventh U.S. Circuit Court of Appeals.

The Illinois State Rifle Association had backed a challenge to the county ordinance that bans the possession, use and sale of assault weapons and large capacity magazines, the Cook County state’s attorney’s office said in a statement.

The rifle association claimed the regulation violated the Second Amendment, the state’s attorney’s office said.

The state’s attorney’s Civil Actions Bureau argued against the challenge, claiming the ordinance protected Cook County residents form the treat of mass casualty incidents posed by those weapons and accessories, the state’s attorney’s office said.

The judge ruled that the plaintiffs “have not come forward with a compelling reason to revisit our previous decision.”

State’s Attorney Kim Foxx said in a statement that “Assault weapons and large capacity magazines are designed to kill in mass and have no business on our streets.”

“Public safety is our top priority, and we were proud to defeat the gun lobby’s challenge in court. While we are pleased with today’s decision, we anticipate that this will be appealed to the Supreme Court. If it is, we will be ready,” she said.