A security threat Saturday morning at San Francisco International Airport led to the closure of some boarding areas and grounding of flights, according to an airport spokesman.

The shutdown resulted when a loaded magazine was brought by a passenger through a security checkpoint around 6:35 a.m., airport duty manager Chris Morgan said.

As a result, the boarding areas at security checkpoints F1 and F3 in Terminal 3 and checkpoint G in the International Terminal were closed for about an hour until law enforcement agents were able to locate and interview the passenger.

Flights that were not already on the taxiway also were grounded while the search was conducted, Morgan said. The affected flights mostly involved United Airlines.

Transportation Security Administration agents flagged the suspicious item in the passenger's bag at the security checkpoint but mistakenly pulled the wrong bag for inspection, allowing the passenger to proceed into the terminal with the loaded magazine, Morgan said.

"The passenger was located, interviewed by law enforcement, cited and was allowed to continue to travel. Flights resumed normal operations after a 38 minute ground stop," TSA said in a statement.

The airport was packed with people standing in lines. Many of them traveled into town for the Game Developer Conference in San Francisco and were waiting for the security checkpoints to reopen.

"The pre-check line at SFO is no joke 5,000 people long," Andrew Forbes wrote on Twitter.

Airport operations returned to normal around 9 a.m., Morgan said.

While ammunition can be transported in checked luggage, it isn't allowed in carry-on baggage, according to the TSA. It wasn't immediately clear where officers located the magazine.

Those traveling with firearm magazines and ammunition clips must secure them in a box or in a hard-sided case.

"Unfortunately all these security systems every airport puts in place, the weakest link is the human factor," Aviation analyst Mike McCarron said.

TSA said agents at SFO are private security personnel and the agency said it will work with their contractor to investigate what happened and how.

Officials said the passenger was cited by San Francisco police. The TSA may impose a civil penalty of up to $13,333 per violation.