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 St. Paul Pioneer Press reports the Minnesota Supreme Court will now consider the issue.

Court papers say Haywood, 37, 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.

Haywood argued in his appeal that a BB gun shouldn’t be considered a firearm under the ineligible-person law because the statute does not define the term. He cited dictionary entries that define a firearm as a weapon that uses gunpowder or an explosive charge to fire a shot.

In a Sept. 28 opinion, the court stated, "Minnesota's appellate courts have consistently interpreted the term 'firearm' as used within certain sections of chapter 609 (the Criminal Code) to include BB guns."

The court also cited a ruling in 1977 by the Supreme Court, which stated, "(W)e think that term should be defined broadly to include guns using newer types of projectile propellants and should not be restricted in meaning to guns using gunpowder."

The Associated Press contributed to this report.