KENOSHA, Wis. (CBS) — Kenosha County Judge Bruce Schroeder on Monday dropped a charge related to the gun in the Kyle Rittenhouse trial.

As CBS 2’s Chris Tye reported, the reason has to do with the gun’s barrel.

READ MORE: Teen, 15, Shot In The Loop

The charge Schroeder dismissed was a count of possession of a dangerous weapon by a person under 18 against Rittenhouse. While only a misdemeanor charge, it appeared to be the most likely count to result in a conviction for Rittenhouse, who was only 17 when he carried an AR-15 style rifle in Kenosha on Aug. 25, 2020, and used it to shoot three men, killing two of them.

Defense attorneys argued Wisconsin state law has an exception that would allow 17-year-olds to openly carry firearms if they are not short-barreled rifles, with a barrel of less than 16 inches and an overall length of less than 26 inches.

Schroeder said the Wisconsin law was poorly written, and that the size of the rifle Rittenhouse carried meant he didn’t violate that law. Although prosecutors said they disagreed with the judge’s interpretation of the law, they conceded Rittenhouse’s weapon was not a short-barreled rifle, and Schroeder dismissed that count.

Schroeder dismissed the charge just hours before the jury was set to begin deliberation. CBS 2 Legal Analyst Irv Miller said prosecutors handled the charge very poorly.

“This was a major mistake by them,” Miller said.

On Sunday night, Miller wrote on Facebook: “Quick prediction. Rittenhouse judge dismisses the possession of a weapon by a minor charge prior to jury deliberations tomorrow morning!”

And that was exactly what happened.

READ MORE: CTA Bus Driver Beaten Near Millennium Park

“Somebody under 18 in the state of Wisconsin can have a long rifle. They can’t have a short rifle,” Miller said. “If they’re walking around with a long rifle, no harm, no foul.”

Defense attorneys argued what all parties describe as a murky law. What is key is the last part the state’s definition of a short-barreled rifle.

A “short-barreled rifle” means a rifle having one or more barrels having a length of less than 16 inches measured from closed breech or bolt face to muzzle or – and this is key – a rifle having an overall length of less than 26 inches.

“He was walking around with a long rifle,” Miller said,0 “This wasn’t difficult to determine that this rifle, just by looking at it, was over 26 inches long. This was closer to three feet long.”

If you wondered, like we did, why this was decided so late in this case, Miller said that is a good question for which there is no good answer.

If the charge had stood and a jury convicted Rittenhouse on it, he would have had to serve a maximum of nine months in prison. Rittenhouse has already served 90 days in custody, so it would not have amounted to a dramatic increase in prison time.

But Miller said the charge being dismissed is meaningful from an image standpoint, and amounts to a signal sent to the jury.

MORE NEWS: Oak Park And River Forest High School Ban On Activities Due To COVID Outbreak Sparks Outrage

Miller also said this case does not look good for prosecutors on the other counts either.