SOMERVILLE — A Bernardsville man could serve 10 years in prison after a Superior Court jury Tuesday convicted him of selling an Uzi and ammunition to an undercover detective, Somerset County Prosecutor Geoffrey Soriano said Wednesday.

Samuel J. Medway, 44, was found guilty on all five of his forgery and weapons charges, including second-degree unlawful possession of an assault rifle and third-degree unlawful sale of an assault rifle, Soriano said.

Authorities began investigating Medway in June 2011 after they learned he wanted to sell the assault weapon. A county investigator set up a meeting at Medway’s home and arranged to buy the Uzi and 14 high-capacity magazines for $1,500, authorities said.

Medway also gave the detective a fraudulent bill of sale that was backdated to June 2000. According to Soriano, Medway’s right to possess firearms had been revoked in 2007.