ROCKFORD, Ill. (AP) – An appellate court has tossed a central Illinois man’s gun conviction, ruling a lower court shouldn’t have allowed a Facebook photograph of him standing near guns to be entered as evidence.

Illinois’ 3rd District Court of Appeals reversed the conviction of 29-year-old Spencer D. Watkins. The Peoria man was convicted of being a felon in possession of a gun in 2016 and given a nine-year prison term.

READ MORE: IDES Kept Offices Closed While Many Struggled To Get Their Unemployment Benefits: What Really Happened Inside And Outside Those Walls

The court found the photo wasn’t proof Watkins possessed a gun as he ran from a car after a traffic stop. An officer said he had one, but it was never recovered.

READ MORE: Chicago Weather: Lakeshore Flood Threat Continues

Prosecutors entered the photo to show it was likely he had a gun and disposed of it before his arrest. The defense says the officer mistook a cellphone for a gun.

No retrial date has been set.

MORE NEWS: Climate Change And Chicago's Lake Michigan Shoreline: What The Future May Hold And The Action Being Taken

Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.