“We heard a big celebration,” Mr. Haviland told Fox News shortly after being evacuated.  He described hearing something like a loud pop, followed by the sight of a herd of people running his direction.  “When you see 80 people come running around the corner,” he said, “and they break a door to get out, you think ‘Oh my God, what is happening?’”  He said he saw “people working for the airline taking off their shirts,” and saying, “This is not worth it, I am leaving.”  Within minutes, he said, police officers with their guns drawn were shouting, “Show me your hands!”  The bomb squad soon arrived, and the area was evacuated.  But inside Terminal 8, by the departure gates, many passengers had no idea anything was wrong.  Judy Rothman Rofé, who had been visiting her son in Brooklyn and was waiting for an American Airlines flight back to Los Angeles, was waiting by Gate 33.  Around 10 p.m., a passenger nearby was checking the internet and told her it seemed their flight was not delayed because of the weather.  “There is a shooter at large,” she was told.  Still, she said, as the news filtered out, people around her were relatively calm. “It was business as usual in our section of the terminal,” she said.  Shortly after 11, she said, “we heard screaming.” It was unclear what set off the wave of panic, but suddenly the eerie calm turned to chaos.  Unconfirmed reports of gunfire at Kennedy Airport on Sunday night left travelers panicked as the police worked to evacuate two terminals.  “Lots of screaming, crying, mass hysteria,” she said. The gate agents, she said, were nowhere to be found; passengers threw themselves under counters and huddled under chairs.  After several minutes, an announcement came over the public address system, ordering passengers to leave their bags, put their hands above their heads and evacuate.  As she left, she said, scores of law enforcement officers, weapons drawn, were heading into the terminal.  Around the same time, Terminal 1 was also officially evacuated, sending hundreds of people into the street outside the airport, unsure what was happening.  The Port Authority said that those were the only two terminals evacuated, but that the panic spread quickly to the rest of the airport.  In Terminal 2, where Ms. Rosen was waiting for her San Francisco-bound Delta Air Lines flight, everything seemed normal nearly an hour after the first calls to 911 about a possible gunman. It was around 10:30 p.m. when someone screamed, “Shots!”  “Everyone started screaming and yelling,” Ms. Rosen said. “I dove under this desk space like everyone else.  “Then this guy came running over,” she added. He was not an airport employee or an official, but he had an urgent warning. She recalled that he shouted: “They’re coming! Let’s go this way!”  Not knowing who “they” might be and not wanting to find out, Ms. Rosen and about a dozen others followed the man through a secure door and onto the tarmac, leaving their belongings behind.  “There were no announcements, nothing,” she said. All she could hear was an ear-piercing alarm.  She waited with about 20 others on the hot, humid tarmac. “I called my sister, freaking out,” she said. “I told her I am on the tarmac, people are saying there are gunshots. I think I am safe. If you see news about this, I am O.K.”  The crowd was searching Google and social media when a man — she thought he was a pilot — finally said they should return. “People were like, ‘I don’t want to go back inside,’” she said.  Still, when the man opened the door, they found things just as chaotic as when they left. A flood of people were running in a single direction, she said. Out of the terminal.  Once again she followed the crowd. There were “just mobs of people,” she said.  She spotted a man in a Transportation Security Administration shirt and asked him what was happening. “You probably have a better idea than I do” was his response, she said.  Finally, a little after midnight early on Monday, employees were allowed back inside the airport. Passengers were permitted to collect their belongings.  It would take time for operations to fully resume. And thousands of passengers still needed to figure out what to do next. There were no trains running. The Van Wyck Expressway leading to the airport was closed. Cabs were just starting to trickle back.  Eventually, Ms. Rosen climbed in a cab with several others and made her way to her twin sister’s apartment in the city.  As she prepared to set off for the airport again on Monday morning, she was a bit more leery about the procedures that might be in place in the event of an actual emergency.  “I understand situations like this are inherently chaotic, but the lack of communication and guidance just compounded an already tumultuous and traumatic experience,” she said. “At least in our terminal, they should have had enough time to get a coordinated plan together. But they didn’t, and that caused a lot of unnecessary panic and heartache.”  A version of this article appears in print on August 16, 2016, on page A1 of the New York edition with the headline: False Alarm, Then Panic: Chaos at J.F.K. Airport. Order Reprints| Today's Paper|Subscribe
Officials said there was no evidence that a report of gunfire at J.F.K. on Sunday night was a deliberate hoax. What followed, they said, was a sign of the times.