A Waterloo man is facing nearly two years in prison after posting pictures of himself with guns online.

Eighteen-year-old Jumonie Wilson pleaded guilty to possession of a firearm by a drug user and admitted that he was using marijuana twice in January after police say they saw him on social media posts where he was holding a gun.

One social media post also showed him using marijuana and police say he threw a gun out the window as they approached his residence to do a search. Wilson was sentenced to 21 months in federal prison.

Another eastern Iowa man will spend more than two years in prison on a drug and weapons charge.

Twenty-three-year-old Edinton Wright of Marion pleaded guilty to one count of possessing a firearm as a drug user. Court records showed that Wright — who is originally from Liberia — applied to the Linn County Sheriff for a gun permit in 2017 and said he had not used drugs in the last year. Wright had been discharged from the Iowa National Guard in part for using marijuana.

He used the permit to purchase seven guns and paid for them with phony checks. Police recovered the guns from pawn shops after arresting him on an unrelated warrant. He was sentenced to 33 months in prison.