The man whose gun went off inside a Fridley Target store earlier this month confessed after police arrested him last week, saying the “stupid” gun discharged by accident, according to police.

Seth Allan Millner, 28, has been charged with possession of a firearm by an ineligible person. Further charges most likely are pending, police say.

According to police and the criminal complaint, about 5:30 p.m. Sunday, Dec. 13, Millner was paying for snacks and soda at a checkout center with a gun tucked into the waistband of his pants.

Millner and a woman he was with chatted with the clerk about how they were in the middle of a 12-to-15 hour road trip. During the conversation, police say, the gun fell down Millner’s pants leg. When Millner attempted to grab the gun, it discharged near his left ankle.

Police said the pair ran out of the store and fled in a red Chrysler Sebring.

A bullet struck the floor, although witnesses said Millner was limping as he ran away.

Police received a tip naming Millner as the man in surveillance footage from the store, noting that he drove a red Sebring and was a convicted felon recently released from prison.

The next day, Inver Grove Heights police found the Sebring severely damaged in a wooded area of the city. On Dec. 17, Millner was arrested by St. Paul police on suspicion of driving a stolen vehicle, possession of narcotics, possession of a firearm by an ineligible person and possession of a stolen 9-mm handgun.

After he was arrested and received his Miranda rights, Millner confessed to Fridley police saying, “Alright it was me, it was me in the … Target. I was just walking with it, the stupid (gun) went off. I didn’t fidget with it, it just went off.”

According to the complaint, Millner was convicted in 2014 in Chisago County of possession of a machine gun or short-barreled shotgun. He also has a burglary conviction in Wisconsin. Both make him ineligible to possess a firearm.

Millner remains in custody in Ramsey County. He will be transferred to Anoka County, where he awaits felony charges, police said.