A municipal court judge in New York ruled Wednesday that Paul Wojdan’s rights were violated when police counted the number of rounds in his handgun and then charged him with violations under the SAFE Act.

Lockport City Judge William Watson dropped misdemeanor charges against Wojdan, which stemmed from an October 2013 encounter with Lockport Police officers.

At a traffic stop Wojdan was found to have 10 rounds in the magazine of his legally owned pistol, in violation of the SAFE Act’s arbitrary seven-round limit.

Between the time that Wojdan was arrested and his court date this week, a Federal Judge ruled that New York’s seven-round limit was unconstitutional.

Wojdan was a passenger in a car driven by his wife that was stopped on suspicion of speeding. During the stop, when asked if he had any weapons, Wojdan advised officers that there was a loaded Ruger 9mm semi-automatic handgun in the car, inside a holster in the glove compartment.

Wojdan, 26, is a licensed pistol permit holder and the gun was legally obtained. To verify the serial number on the handgun, Lockport Police Officers Daniel Barrancotta and Adam Piedmont unloaded it.

What happened next was found to be a violation of his rights, according to Judge Watson.

“In observing the magazine, I did notice there were at least 10 rounds in the magazine,” Barrancotta testified, noting the casings visible through the witness holes. He then emptied the magazine.

“I did count rounds just to confirm our reasonable suspicion that there were more than 10,” Piedmont said.

This discovery led to Wojdan being charged with unlawful possession of an ammunition-feeding device, which carries a fine of up to $200 and a possible imprisonment of up to six months in jail.

Wojdan’s lawyer argued that once the firearm was unloaded, in other words the magazine dropped free of the frame and the chamber emptied, so that the gun could be inspected safely, there was no reason for officers to count the rounds and at that point, it was an unreasonable search.

He was backed up by the September 2013 New York State Police guide to SAFE Act enforcement which states: “Unless there is probable cause to believe the law is being violated, there is no justification for checking a magazine to determine whether or not it contains more than 7 rounds.”

The judge agreed and dismissed the case, however Wojdan’s firearms, which were seized by the Niagara County Sheriff’s office in October, were not immediately returned.

Wojdan’s attorney said he will file a motion before Niagara County Judge Matthew J. Murphy III for the return of the guns, meanwhile the Lockport Police Department is reviewing their procedures.