A Lehigh County borough has been ordered to repeal an ordinance on firearms after a county judge determined it did not have the authority to enforce and make the ordinance.

Coplay and its Borough Council were sued last year in Lehigh County Court by Whitehall Township resident Michael Mizur and nonpartisan organization Firearm Owners Against Crime. The suit alleged the borough’s ordinance on firearms, which prohibited the discharge of guns or firearms within the borough, with exceptions for self-defense, violated Pennsylvania law and the constitution.

The ordinance states anyone who violates it could pay a fine of up to $600 and could spend up to 30 days in county jail.

The complaint said Mizur, a legal gun owner who frequently visits Coplay, wanted to hunt waterfowl in the borough. He feared prosecution from the ordinance, according to the lawsuit.

The borough’s attorneys wrote in court documents that the ordinance only regulates the discharging of firearms, and not possessing firearms.

Presiding Judge Melissa Pavlack ruled earlier this month that the ordinance violated the Pennsylvania Uniform Firearms Act, which states no municipality can regulate the lawful ownership, possession, transfer or transportation of firearms or ammunition when carried for purposes not prohibited by law. It also violates the state constitution, she said.

The courts in the state have interpreted the UFA as encompassing use and discharge of firearms, her ruling states.

She prohibited the borough from enforcing the ordinance, and directed the borough to repeal it.

The Firearm Owners Against Crime is a Pennsylvania-based organization that is dedicated to protecting the Second Amendment rights of law-abiding gun owners, according to its website.