MADISON, WIS. -- Prosecutors in Kyle Rittenhouse's murder trial may have lost their best chance at convicting the Illinois man of something when the judge threw out a charge that Rittenhouse was a minor in possession of a dangerous weapon.

Rittenhouse shot three men, killing two of them, with an AR-15-style rifle during a chaotic protest against police brutality in Kenosha last year. A jury deliberated about 3 1/2 days before finding Rittenhouse not guilty on Friday of five felony charges, including a murder charge that could have carried a life in prison sentence.

That jury never got to consider the gun possession charge -- one that at one time had seemed a slam-dunk for the prosecution. Rittenhouse was 17 at the time, and there was no dispute that he was armed the night of the shootings with a Smith and Wesson AR-style semiautomatic rifle strapped to his chest.

Though the charge was only a misdemeanor -- punishable by a maximum nine months in jail -- it might have offered the jury a way to convict Rittenhouse of a lesser crime if they were persuaded by his self-defense claims but agreed with prosecutors that he made a poor decision to carry a rifle on the streets of Kenosha.

SO WHAT HAPPENED?

Hours before closing arguments began on Monday, Judge Bruce Schroeder granted a defence motion to toss out the weapons charge. Rittenhouse attorneys Mark Richards and Corey Chirafsi pointed to an exception in the law that they said allows minors to possess shotguns and rifles as long as they're not short-barreled.

Assistant District Attorney James Kraus argued that the exception renders the state's prohibition on minors possessing dangerous weapons meaningless. But when he acknowledged that Rittenhouse's rifle's barrel was longer than 16 inches, the minimum barrel length allowed under state law, Schroeder dismissed the charge.

To Kenosha-based defense attorney Michael Cicchini, the statute clearly requires a weapon to be short-barreled to apply, and the judge made the right call.

"There doesn't seem to be much ambiguity here," he said. "(The charge) should have been dismissed earlier."

The current wording of the overarching law seems clear: "Any person under 18 years of age who possesses or goes armed with a dangerous weapon is guilty of a Class A misdemeanor." A lead-in paragraph defines dangerous weapon as several things, including "any firearm, loaded or unloaded."

The subsection that defense attorneys relied upon to seek dismissal reads: "This section applies only to a person under 18 years of age who possesses or is armed with a rifle or a shotgun if the person is in violation of s. 941.28 ..." That section of law isn't specific to minors, but rather forbids any person from having a short-barreled shotgun or rifle.

"We knew from the beginning, that if you read that statute correctly, he was legal in having that firearm," Richards said Friday after Rittenhouse was cleared of the remaining charges.

The evolution of the law on children and guns is murky. Prior to 1987, Wisconsin banned children from possessing pistols. Then-Gov. Tommy Thompson, a Republican, signed a law that year that expanded the prohibition to include short-barreled firearms, electric weapons, brass knuckles, throwing stars and nunchakus. Four years later, Thompson signed another law extending the prohibition to any firearm. But that law also allowed minors to possess long guns for hunting as long as the barrels were at least a foot long.

Legislative records show the statutory language went through multiple revisions until at least 2011.

The wording is hardly straightforward. Schroeder himself said he was confused about it when Richards first asked him to toss the possession charge out earlier this year.

The impetus for the carve-out isn't clear. Jeri Bonavia, executive director of the Wisconsin Anti-Violence Effort, a group that works to reduce gun violence, said the National Rifle Association was making a national push to get guns in children's hands in the late 1990s and early 2000s in hopes of creating life-time gun owners; the caveat may have been part of that push, she said. But she said it appears that minors can possess long guns as long as they're not sawed off.

She called that concerning.

"There are a number of things we don't allow young people under 18 to do. There are reasons for that. Judgment isn't as perfected at age 16 as it is much later. We've seen what that means in Kenosha, with the tragic outcome."

Tom Grieve, a Milwaukee attorney and a former Waukesha County prosecutor, speculated that the long-gun exception was drafted to ensure children could hunt and lawmakers didn't envision it could be used to protect children who carry long guns at protests like the demonstrations in Kenosha.

"I think it was designed with an eye toward hunting and enabling law enforcement to add additional charges against minors hunting without a license," he said. "Wisconsin is a hunting state. When people talk about long arms, they're thinking in the hunting context."

He said he thought Schroeder was right to dismiss the charge. Grieve called the exception an "extraordinarily poorly worded statute" marred by technical language and too many cross-referrals to other sections of Wisconsin weapons and hunting laws. He said that's typical in more obscure areas of state law that get little attention. When a law is so confusing, legal doctrine calls for judges to interpret it in favor of defendants, he said.

"If this were baseball, the tie goes to the runner," he said. "This is an alien concept to us in 21st-century America, but in awful situations around the world you have oppressive governments that thrive under poorly written laws, allowing them to prosecute people whenever they want for whatever they want. (The doctrine) is a safeguard against tyranny."

Cicchini, the defence attorney, rejected the argument by prosecutors that the exception shreds a law intended to keep minors from having dangerous weapons. He noted that the prohibition still blocks children from carrying pistols, sawed-off shotguns and rifles and other weapons such as brass knuckles.

Grieve and Cicchini both said they've never seen the long-gun exception come into play like it did in Rittenhouse's case, largely because juveniles tend to use handguns when committing crimes and in those cases prosecutors tend to charge them with far more serious offenses, such as armed robbery.

Democrat Jon Erpenbach, who has served in the state Senate since 1998, said he didn't know why the exception was developed but he can't imagine that lawmakers intended to allow kids to walk down the street with semiautomatic rifles.

"Certainly in 1991 we weren't seeing what we're seeing in '19, '20 and '21 with protests and insurrections," he said. "Once you throw a gun in there, it's not a good situation for anyone. If that legislation is written today, I would tend to think that example would pop into a legislator's mind, saying 'wait a minute, is the situation in Kenosha covered or does it leave a loophole?"