By Jonathan Stempel

(Reuters) - The federal appeals court in Chicago dealt that city a setback in its effort to control guns, declaring unconstitutional two zoning restrictions governing shooting ranges and a requirement that people be at least 18 years old to enter ranges.

A three-judge panel of the 7th U.S. Circuit Court of Appeals on Wednesday said Chicago violated the Second Amendment by restricting gun ranges to manufacturing areas, and banning them from close proximity to residential areas, schools, places of worship and other gun ranges.

It said Chicago failed to justify its "extraordinarily broad" claim that minors could not enter gun ranges, and that teenagers can be taught to shoot guns safely.

Chicago has struggled to control gun violence that last year contributed to its highest murder rate in two decades.

The city of 2.7 million had 762 murders in 2016, more than twice as many as New York City, despite having less than one-third of that city's population.

A spokeswoman for Chicago Mayor Rahm Emanuel had no immediate comment on Thursday, including on whether an appeal is planned.

In court papers, Chicago called gun violence a "serious public health and safety problem with both social and economic consequences." It said gun ranges could attract thieves, as well as threaten lead contamination, noise pollution and fire.

Writing for the appeals court, however, Circuit Judge Diane Sykes said the city provided no evidence to back up such claims, something even its own witnesses acknowledged.

While preventing crime, protecting the environment and preventing fire were "important public concerns," Sykes said Chicago could not simply "invoke these interests as a general matter and call it a day."

The judge said Chicago could still craft a narrower age restriction to let properly supervised teenagers and older adolescents learn how to shoot at gun ranges.

Circuit Judge Ilana Rovner partially dissented, saying she would have upheld the distancing requirement. A lower court judge had upheld the distancing and age requirements.

President-elect Donald Trump last year included Sykes on a list of candidates he might nominate to the U.S. Supreme Court.

Chicago had adopted a gun range ban after the Supreme Court in 2010 struck down a city law prohibiting handgun possession.

The 7th Circuit later struck down the ban, leading the city to adopt the regulations discussed in Wednesday's decision, and which gun rights advocates opposed.

The case is Ezell et al v. Chicago, 7th U.S. Circuit Court of Appeals, Nos. 14-3312, 14-3322.

(Reporting by Jonathan Stempel in New York)