'How I Met Your Mother' Co-Creator Says He Ran For His Life at LAX Shooting
PHOTO: Police, emergency response vehicles and officials are positioned outside Terminal 3 at Los Angeles International Airport on Nov. 1, 2013 where shots were fired, prompting authorities to evacuate a terminal and stop flights.

The "How I Met Your Mother" family was in danger of losing one of its own today in Los Angeles.

A gunman armed with an assault rifle entered a terminal at Los Angeles International Airport this morning, killed a TSA agent and injured several others.

One person at the airport was "HIMYM" co-creator Craig Thomas, who said he feared for his life and said he was 40 feet from where the gunman's rifle ended up lying on the ground.

"I was at LAX Terminal 3 this morning, waiting to fly to New York - I had to run for my life, with many others," he tweeted this afternoon. "This was a terrifying experience I will never forget."

Thomas added his condolences to the family of the TSA agent who was killed and thanked law enforcement for acting quickly to get the situation under control.

Read: LAX Gunman Kills TSA Officer Before Taken into Custody

"I feel lucky to be alive and grateful for how many amazing people are in my life," he added in the tweet. "Only just catching my breath from this --- I feel for the injured and the deceased...that could most certainly have been me instead."

Noticeably shaken up, Thomas tweeted almost 20 times, including that it's one thing to see "a story like Sandy Hook and know in your head that we have to do something about guns in our country.... It's another thing to run for your life and wonder if you'll ever see your wife and child and friends again."

Thomas added a few tweets on how he strongly believes there should be stricter gun control in America, thanked all his show's fans for their support and added a sentiment about his close friends and show co-creator.

"Got the biggest, best hug from my bro @CarterBays today when I got to the office from LAX and it made me cry like a baby," he said.

More ABC News