ST. PAUL (AP) — The Minnesota Supreme Court has agreed to review the case of a convicted felon sentenced to five years in prison for possessing a BB gun.

David Lee Haywood was charged in Ramsey County in 2013 with possession of a firearm by an ineligible person. He was convicted after the judge told the jury a BB gun counts as a firearm.

The Minnesota Court of Appeals upheld his conviction in September, saying appellate courts have consistently included BB guns in the definition of firearms.

The Minnesota Supreme Court will now consider the issue.

Court papers say Haywood was caught with a BB gun that looks like a Walther P99 pistol. Haywood was deemed ineligible to possess a firearm because of a 2005 drug conviction.