New Yorkers took to the streets for Halloween celebrations just hours after eight people were killed in what authorities called a terror attack.

Security was heavy as the Greenwich Village parade stepped about a mile away and four hours after a truck mowed down pedestrians and cyclists along a bike path near the World Trade Centre memorial.

But the raucous spectacle rolled along with its floats, bands, anything-goes sensibility and thousands of spectators.

"Even though we're shaking, we're still strong. We're not living in fear," said Em Weiss, 28. She added: "It sends a message terrorism doesn't win."

Cathryn Strobl, 23, who was wearing a Buffy the Vampire Slayer costume, said: "You can't let it stop you from living your life."

The parade, which was open to anyone wearing a costume, began in 1973 with a puppeteer marching with his family and grew into a televised extravaganza.

Ghosts, goblins, zombies, superheroes, men on stilts, a group of human bumblebees and a float of topless people were among those making their way up Sixth Avenue on Tuesday night, as spectators bobbed to drumming and Caribbean music.

Governor Andrew Cuomo visited the route as the parade started, and Mayor Bill de Blasio assured residents and visitors earlier that police were out in force.

"We are going to go about our business in the city, and we are not going to be deterred," Mr de Blasio said.

The man accused of the attack is 29-year-old Sayfullo Saipov, an Uzbek immigrant. He entered the US legally in 2010.