Undaunted, they came out in droves: pirates, skeletons, fairies, crooks and dinosaurs, in bulky costumes and revealing outfits, weaving in and out of barricades in Manhattan as police helicopters flew overhead on a chilly fall night.

They did what New Yorkers do when they are out on the town: They danced with strangers in the street. They took selfies.

They laughed, and cried and argued, oblivious to the bustling world around them. They celebrated Halloween with zeal and verve despite the trail of carnage left by a driver who had plowed into a bike lane a few blocks away, just hours before.

New York’s typically flippant strain of resilience was on full display.

“After living here for so many years, things like this are okay,” said Kevin Bryant, decked out like a golden tin man.

“You go with it. Just keep living,” he said.

Bryant said he wasn’t willing to let his outfit, a shiny suit dotted with small mirrors and conical shapes that he was calling “Black gold of the sun,” go to waste.

“After all the craftsmanship and workmanship of putting together a costume, I was not going to miss it,” he said.

This reputation for resiliency has been hard earned in New York, in the aftermath of terrorist attacks like 9/11, some other heinous rampages of violence, and both natural and man-made disasters, like Hurricane Sandy and the 2005 subway strike. And it can easily turn into a negative stereotype of the city’s residents as cold and unfeeling.

But interviews with some of those out celebrating Halloween in Lower Manhattan on Tuesday also revealed something deeper and more global at play: that the threat of terrorism has become part of the chaotic backdrop of modern cities, another urban danger calling for vigilance.

“To be quite honest, we’ve grown up in a state of fear,” said Nastassja Sarandrea, 18, a college student from Long Island out for the night with friend Catherine Escobar. “So I don’t think that should stop us from doing what we want to do.”

Sarandrea said that the flood of news about terrorist attacks around the world has left her on edge. She sits facing the door when she studies at the library. She leaves one earphone out, to better know what’s going on.

Godfrey Clark, 53, a sanitation worker dressed as a pirate in Greenwich Village, compared it to the risk drunk drivers posed to pedestrians.

“That’s the nature of things,” he said. “You keep it in the back of your head. That’s the day and age we’re living in.”

He said he has made a point to school his children in vigilance.

“I try to teach my kids — watch your surroundings,” he said.

On Sixth Avenue, near what had been one end of the parade route, three large sanitation trucks filled with gravel stood as solid barricades, part of a large security presence around the city.

Dozens of officers massed on corners, as police radios crackled down quiet streets. The scenes led themselves to curious juxtapositions: Siren lights flights reflecting off a white angel and a red devil as they walked by the trucks. A woman in a skirt posing suggestively on a fire engine.

But many of the security measures were in place long before Tuesday’s attack. A worker inside one of the sanitation trucks said they were part of the routine security for the event.

“This is just regular stuff,” he said. “Anytime there’s something like the parade or something, we’ve got to do blockades.”

The driver in the attack, who officials identified as 29-year-old Sayfullo Saipov, had pulled his rented truck into the West Side Highway bike lane just blocks from there, heading south to begin his fatal rampage.

Nearby, Marcus Grillot, 31, dressed up in a “Thunder Buddy” costume inspired by the movie “Ted” and Jojo Dicsotanzo, 31, dressed as Eleven from the Netflix series “Stranger Things,” said that they had been walking around barricades for most of the night.

“I’m kind of used to it to be honest. It’s expected.” Grillot said. “Big crowds, big targets.”

Photos from the aftermath of the New York truck attack

NEW YORK, NY - OCTOBER 31: Police gather at the scene after reports of multiple people injured after a truck plowed through a bike path in lower Manhattan on October 31, 2017 in New York City. (Andy Kiss/Getty Images)

Many people interviewed said that the attack had given them pause, as they considered their Halloween plans, many of which revolved around Greenwich Village’s famous parade. Many said that they had decided to go despite the advice of their family. Others said that the word that the New York Police Department’s patrols would be increased encouraged them. Some said that they had canceled their plans, only to emerge after the parade.

“We came so late because we didn’t want to go to the parade,” said Natasha Wells, 19, dressed a cheerleader. “We were kind of scared about it honestly, but we were like, ‘Should we go?’ ” She and a friend had elected for a cab from their apartments on the Upper East Side, instead of taking the subway downtown after the attack.

Andrea Andresakis, a theater director and choreographer dressed up as a fairy, stood with her boyfriend, a priest for Halloween, near the recently christened Stonewall monument, at perhaps the heart of the festivities for the night. The crowds of people in costumes were thick; grim reapers, wonder men and women in drag, jail breakers and others wearing capes, boots and corsets. A few people stumbled, perhaps having had a few too many drinks.

Standing in a pair of gossamer green wings, Andresakis said the couple refused to let terrorists “ruin their lives.” Still, they had devised an elaborate escape plan for their visit to the parade. Unlike previous years, when they had stood against the barricades to get the best view, this year they hung back, and made sure they had multiple escape routes.

“This time we said we don’t go to the front of the barriers because if the attack comes behind or whatever, they’ll be a rush and crush,” said her boyfriend, who declined to give his name.

“There were three directions where we could go,” Andresakis said.