1:56 PM PT -- We got David leaving jail, and he tells us the gun was his and totally legal. He's got nothing but respect for the officers who arrested him, and says he'll clear everything up later today.
Law enforcement sources tell TMZ Henrie was going through a TSA screening Monday morning at the airport and agents discovered the weapon. We're told the gun was an M&P Shield 9mm pistol and it was loaded.
Henrie was immediately detained and taken to a nearby station.
Henrie starred as Gomez's brother on "Wizards of Waverly Place" from 2007-2012. He's also made appearances on "How I Met Your Mother" and "Arrested Development." David was also on "That's So Raven" for 12 episodes with Raven-Symone and Orlando Brown.
Brown's had his fair share of run-ins with the law -- with several arrests over the years -- he was most recently caught on surveillance in a burglary.
Henrie recently revealed he and his wife, Maria Cahill, are expecting a daughter. In announcing the pregnancy, Henrie said, "That reminds me. Where's my shotgun. I don't have a shotgun. Someone get me a shotgun!"
We reached out to his reps ... so far, no word back. Henrie is still in custody.
Originally published -- 11:06 AM PT