LARGO, Fla. (WFLA) — A Pinellas County man is facing a felony charge after police say he accidentally shot himself in the leg while picking up a 24-pack of soda at Walmart.

The alleged incident happened just before 9 p.m. Saturday at the Walmart on Missouri Avenue in Largo.

According to an arrest affidavit, 30-year-old Kyle Griffith had a gun in his waistband without a holster when he bent over to pick up the case of soda. While he was bending over, police say the firearm “suddenly discharged.” Griffith suffered an injury to his upper right thigh, the affidavit says.

Police say several witnesses, including an officer with the Largo Police Department, saw Griffith take the gun from his pants after he was shot and slide it across the aisle to his brother.

Officers wrote in the affidavit that Griffith couldn’t provide them with a concealed carry permit. Authorities were later able to confirm he did not have a permit, despite him claiming to have one in Virginia, according to police.

Griffith was arrested and charged with felony carrying a concealed firearm. According to the affidavit, and jail records out of Pinellas County, Griffith was previously arrested and charged with carrying a concealed firearm in March.

The arrest affidavit shows police seized the weapon, which was described as a pistol.