Firing off a celebratory mortar to ring in 2017 could land a 29-year-old Elgin man in prison.

Jose A. Cantu, of the 200 block of Michigan Street, was charged Sunday with the felonies of armed habitual criminal, reckless discharge of a firearm, possession of 30 to 500 grams of marijuana, along with possession of a gun without a Firearm Owners Identification card.

The most severe charge of armed habitual criminal carries a penalty of up to 30 years in prison with no chance of probation. Cantu is accused of possessing an AK-47 assault rifle while having two previous felony convictions -- — a 2010 robbery and a 2014 aggravated battery to a police officer.

Authorities were called about 1:30 p.m. Sunday to Michigan Street after a “loud explosion” was heard. Along the way, officers heard what they believed to be gunshots and found six spent shell casings outside Cantu’s residence, a police report said.

Officers also saw a metal pipe protruding from the ground, possibly for launching fireworks or mortars. Cantu’s father gave police permission to search the home and officers found a loaded AK-47 stashed in a bathroom ceiling, along with 487 grams of marijuana in Jose Cantu’s bedroom, according to the report.