Gun control advocates just suffered a major blow in the nation's third-largest city.

The 7th U.S. Circuit Court of Appeals ruled Wednesday in a lawsuit brought by Chicago resident Rhonda Ezell that it's unconstitutional for the city to impose restrictions on gun ranges. The court said that city officials didn't provide enough evidence to suggest that the city's restrictions on gun ranges make residents any more safe.

The law in question sought to restrict gun range business locations to manufacturing areas, required that gun ranges be a certain distance away from residential areas, schools, parks and places of worship and required that anyone entering a gun range be at least 18 years old.

"The city has provided no evidentiary support for these claims, nor has it established that limiting shooting ranges to manufacturing districts and distancing them from the multiple and various uses listed in the buffer-zone rule has any connection to reducing these risks," the court's opinion reads, according to the Chicago Tribune.

The panel of three judges largely concluded that the city's attempt at regulating gun ranges is at odds with citizens' Second Amendment rights.

One of the judges, however, said she would have upheld the portion of the law that says gun ranges in Chicago must be a certain distance away from residential areas, schools, parks and places of worship.

The judge who authored the majority opinion, Diane Sykes, happens to be one of the names President-elect Donald Trump is reportedly considering to replace the late Justice Antonin Scalia on the Supreme Court.

The court's decision is the latest in a saga of major blows to city leaders trying to regulate firearms. In 2010, the U.S. Supreme Court ruled Chicago's blanket ban on handguns unconstitutional, resulting in city lawmakers rephrasing the law to ban only the sale of handguns within city limits. That law fell flat in 2014 when a federal judge struck it down.

“Chicago's ordinance goes too far in outright banning legal buyers and legal dealers from engaging in lawful acquisitions and lawful sales of firearms,” U.S. District Judge Edmond E. Chang wrote in his opinion, according to Bloomberg.

City lawmakers also enacted a complete ban on gun ranges in 2010 but were shot down by a federal court of appeals the very next year. City leaders also tried in 2010 to impose restrictions on where gun ranges can be located. Wednesday's decision was in response to that action.

The victory for gun rights supporters comes as Chicago continues to grapple with a record high level of gun violence in the city. Last year was the deadliest year for gun-related crimes in nearly 20 years, with more than 4,300 people shot during the 12-month period and more than 750 killed.