Watson dismissed a misdemeanor charge against Wojdan, filed because the magazine of his 9 mm Ruger handgun contained 10 bullets, more than the limit of seven bullets per magazine under the Secure Ammunition and Firearms Enforcement Act.

On Dec. 31, 2½ months after Wojdan’s Oct. 12 arrest, Chief U.S. District Judge William M. Skretny ruled that the seven-bullet rule was unconstitutional, the only portion of the law he did not uphold in his New Year’s Eve decision on a legal challenge to the SAFE Act, the gun-control law passed by the State Legislature at the behest of Gov. Andrew M. Cuomo in January 2013.

However, Niagara County prosecutors kept working on the case against Wojdan until Watson ruled after a hearing that opening up the handgun’s magazine to count the bullets was an illegal search.

Wojdan, 26, of Parkwood Drive, Lockport, wasn’t all that happy after court, despite the dismissal of the criminal charge, because he won’t immediately get all his firearms back.

After Wojdan’s arrest, Niagara County sheriff’s deputies confiscated five other guns listed on his pistol permit, which also covered the Ruger.

“What does he gain keeping my guns?” Wojdan stormed as attorney James D. Tresmond tried to calm him. “I should have them back right now.”

Tresmond said he will file a motion before Niagara County Judge Matthew J. Murphy III for the return of the guns.

Wojdan was a passenger in a car driven by his wife at about 2 a.m. Oct. 12, when Lt. Adam Piedmont of the Lockport Police Department clocked it going 44 mph in a 30-mph zone on South Transit Street.

The car didn’t stop until Piedmont had followed it for about a mile and a half.

Piedmont was joined by Officer Daniel Barrancotta, who testified that he joined the chase when he heard the siren while waiting in the drive-thru lane at Mighty Taco.

Piedmont said he asked if there were any weapons in the car. Wojdan said there was one in a holster in the glove compartment, and his pistol permit was in the center console.

After ordering Wojdan and his wife out of the car, Piedmont said he directed Barrancotta to find the permit and the gun, which the patrolman quickly did. Piedmont then told Barrancotta to “make the gun safe.”

“My experience is, the best way to make a gun safe is to remove the magazine,” Piedmont testified.

Barrancotta said it was also the only way to check the serial number to match it against the list on the pistol permit, and to make sure there was no round in the firing chamber. There was not.

There is a row of what Piedmont called “observation holes” in the magazine, each numbered, with bullets visible through the holes.

“In observing the magazine, I did notice there were at least 10 rounds in the magazine,” Barrancotta testified. He then emptied the magazine.

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

Tresmond said, “Once the magazine is removed from the firearm, the firearm cannot fire. At that point in time, the search of the firearm should have ceased. But the officers went further. … It was a search without a warrant.”

Assistant District Attorney David A. Hoffman thought the officers’ action was permissible. He argued, “I think it’s reasonable for them to check the firearm and the magazine. They didn’t seek the number of rounds in it. They did it for officer safety.”

Watson ruled from the bench that the officers had a right to ask about weapons, given the prolonged pursuit of the car. “I think the officers had a lawful right to make the weapon safe,” Watson added. But when they started counting rounds, they went too far, the judge concluded.

Lockport Police Chief Lawrence M. Eggert said his department’s policies on checking guns will be altered where necessary.