David Henrie, known for his role in the Disney Channel show “Wizards of Waverly Place,” was arrested Monday for bringing a loaded handgun to Los Angeles International Airport, police said.

Variety confirmed with an LAX public information officer that Henrie was arrested at about 9:05 a.m. on Monday at Terminal 2 at LAX after TSA officers went through his baggage and found the firearm. He was booked into LAPD Pacific Division Jail and has since been released with a court date.

Following the incident, Henrie apologized in a statement on Twitter, saying that he “unintentionally” brought his gun, which he legally owns and is registered to his name.

“I am so sorry for any trouble it caused but I am appreciative of TSA’s efforts in implementing the safety laws that are in place to protect our beautiful country,” he wrote. “More than anything I am humiliated and embarrassed that this even happened.”

Henrie starred as Selena Gomez’s brother on the Disney Channel show, which ended in 2012. He has also appeared on numerous television shows like “House,” “How I Met Your Mother,” and “Arrested Development.” He is set to direct a movie called “This Is the Year” that he also co-wrote, and filming is expected to begin this week.