By Jonathan Stempel

(Reuters) - It is the job of airport security screeners to stop terrorists, not to referee disputes between passengers waiting on line, a U.S. magistrate judge has ruled, in dismissing a lawsuit brought by an unhappy traveler.

Judge Howard Lloyd issued the decision late on Tuesday, in a year when thousands of waiting passengers have missed flights because of tighter security requirements and staff shortages at the U.S. Transportation Security Administration.

Justin Ngo, of Sunnyvale, California, filed his lawsuit in nearby San Jose, after TSA agents refused to detain a family waiting behind him at a checkpoint at Honolulu International Airport in February 2014.

In his complaint against the TSA, the airport and officials, Ngo said a mother and her children kept hitting his luggage while playing, ignoring his requests to stop, while the father repeatedly kicked the luggage and told him to "Lighten up!"

He said he suffered emotional distress and that the TSA was negligent and an accomplice to assault and harassment.

But the judge said Congress created the TSA soon after the Sept. 11, 2001, attacks to combat terrorism and prevent "mass murder" in the skies, not mediate disputes between careless or impatient passengers on line.

"When Ngo entered the security checkpoint, the TSA was a gatekeeper obliged to determine whether he should be permitted to pass," Lloyd wrote. "The TSA had no duty to detain a family at his command."

Ngo, who represented himself in the lawsuit, had no immediate comment on Wednesday.

The case is Ngo v. Transportation Security Administration et al, U.S. District Court, Northern District of California, No. 16-00481.

(Reporting by Jonathan Stempel in New York; Editing by Howard Goller)