See more of the story

"American Idol" winner Scotty McCreery was cited for a misdemeanor violation last week when he tried to pass through airport security with a loaded gun.

The News & Observer reports that McCreery was stopped by Transportation Security Administration agents at Raleigh-Durham International Airport in North Carolina when the X-ray detected a loaded 9 mm Smith and Wesson handgun in his backpack. Investigators also found two boxes of ammo in the bag.

The 23-year-old country singer, who has a permit to carry a concealed firearm, told police that he had been to a gun range prior to visiting the airport and had forgotten to remove the weapon from his bag.

Also Read: How Ryan Seacrest Can Juggle Hosting 'American Idol' in LA and 'Live' in NYC

"I have been a concealed carry permit holder for a while now after being robbed at gunpoint in 2014, and I take gun safety very seriously," McCreery said in a statement to Billboard on Friday. "While in between tour dates last week, I went to go target shooting with a friend a few days before an early flight out of my hometown Raleigh-Durham airport."

"Unfortunately, I did not realize that I left my pistol in my backpack until the TSA found it during the security X-ray screening and rightfully confiscated it," the statement continued. "I had my concealed carry permit on me so once they had checked everything out, they then released me to catch the next available flight. Great to know our airport security force is on the job. I have learned a lesson that I won't forget."

Also Read: Ryan Seacrest to Host ABC's 'American Idol'

In 2011, McCreery was crowned the winner of Season 10 of "American Idol." In 2014, he and a few friends were robbed by three armed gunmen in a home invasion. One of the men pled guilty to robbery with a dangerous weapon last June and was sentenced to 17 years in prison.