NEWARK, N.J. (AP) — Prosecutors say a New Jersey man who was barred from owning firearms due to a previous felony conviction modified a replica submachine gun into a functioning automatic weapon.

The U.S. Attorney's Office says 69-year-old David Lutter pleaded guilty Monday to possessing three firearms as a previously convicted felon.

Court records show Lutter tried to sell the replica Thompson submachine gun to an undercover U.S. Bureau of Alcohol, Tobacco and Firearms agent in 2017.

Authorities say he modified the weapon so it could fire like an automatic, and he installed a "rock-and-roll switch" that allowed the gun to go between semi-automatic and automatic mode.

Lutter could not have firearms due to a 1993 conviction for sexual assault of a minor.

He faces up to 10 years in prison.