NASCAR star Kyle Busch says he was detained by authorities in Mexico last month ... after he says they found a handgun in his bag at an airport. Busch said it all happened following the conclusion of his vacation with his wife, Samantha, in late January. According to the 37-year-old driver, he was going through airport security screening ... when he realized he accidentally brought his firearm in his luggage. Busch claims he has a valid concealed carry permit for it -- but its discovery still alarmed authorities, who detained him over it all. "I was not aware of Mexican law and had no intention of bringing a handgun into Mexico," he said in a statement on his social media page Monday. "When it was discovered, I fully cooperated with the authorities, accepted the penalties, and returned to North Carolina." Prosecutors in Quintana Roo appeared to address the incident in a statement released over the weekend. Officials said the defendant, ID'ed only as "Kyle Thomas 'B'" from the state of Nevada, was detained following the discovery of a firearm on Jan. 27. They noted that following an investigation, he was sentenced to three and a half years in prison as well as a fine. This sequence from Kyle Busch and Martin Truex Jr. ????#NASCAR pic.twitter.com/mTCrLx2Y29 Busch made no mention of a prison sentence in his statement Monday. "I apologize for my mistake and appreciate the respect shown by all parties as we resolved the matter," Busch said. "My family and I consider this issue closed." Busch raced in the Busch Light Clash at The Coliseum in Los Angeles on Sunday ... finishing in third place.