Confusion prevailed as people were evacuated to the sidewalk outside the terminal and traffic around the airport was diverted, passengers said. On Twitter, the airport warned passengers of disrupted flights and delays.

Ed Kazmierczak, 36, of Ridgefield Park, N.J., said he and his family had arrived at the airport around 7:20 a.m. and were walking into the terminal when a New York State trooper with a rifle stopped them, telling them there was a “situation” inside. There were officers at every entrance, Mr. Kazmierczak said, and a SWAT truck blocking cars coming from the highway.

For the most part, the situation seemed to be under control, he said, although the sidewalk outside of the terminal got “a little crazy” as people milled about.

“Lots of people and no answers,” he said.

Mr. Kazmierczak’s children, who are 5 and 2, began to get restless, so he and his wife set up an impromptu viewing party of the Disney film “Moana” on an iPad. Their children sat on the sidewalk to watch; other children joined, too.