Five days after a truck plowed through a bike path in lower Manhattan, killing eight people and injuring 12, thousands of people filled the streets of New York City with music, hugs, and cheers. It was not a vigil, but the annual New York City Marathon – one of the world’s largest and best-attended sporting events.

In the days after the truck attack, New York authorities were on high alert. Hundreds more officers were deployed across the city, and bomb-sniffing dogs were sent to patrol tourist attractions and subway stations. More security was deployed for the marathon than any year in history, according to Carlos Gomez, Chief of Department for the New York Police Department (NYPD). The event was expected to draw more than 50,000 runners, and as many as 2.5m spectators.

Before the event, on the South side of Central Park, empty roads were punctuated by emergency vehicles with flashing lights, police talked among themselves, keeping an eye on the number of tourists dragging suitcases up the street on the way to their next night's stay.

At the Central Park finish line on Sunday, many of those runners and attendees said they hadn’t thought twice about turning out.

“I wasn't worried about it at all,” runner Caitlin Tateishi told The Independent. “I knew New York would take good care of us.”

The marathon was Ms Tateishi’s sixth. She has also run the Boston Marathon, where a terrorist attack killed three people and injured hundreds more in 2013. Her friend, Emily Richards, who turned out to support her, said their running group had been worried about something similar happening in New York,

“But you just have to live your life and do what you want to do, and not be afraid of what might happen,” Ms Richards said. “You could get hit by a car crossing the street.”

New York Truck attack Show all 6 1 /6 New York Truck attack New York Truck attack Investigators inspect the truck following the attack Investigators inspect a truck following a shooting incident in New York on 31 October 2017. Several people were killed and numerous others injured in New York on Tuesday when a suspect plowed a vehicle into a bike and pedestrian path in Lower Manhattan, and struck another vehicle on Halloween, police said. A suspect exited the vehicle holding up fake guns, before being shot by police and taken into custody, officers said. The motive was not immediately apparent. Getty New York Truck attack A paramedic looks at a body along the bike path A paramedic looks at a body covered under a white sheet along the bike path 31 October 2017, in New York. A motorist drove onto a busy bicycle path near the World Trade Center memorial and struck several people Tuesday, police and witnesses said. AP Photo/Bebeto Matthews New York Truck attack The truck driver collided with a school bus Authorities respond near a damaged school bus Tuesday, 31 October 2017, in New York. A motorist drove onto a busy bicycle path near the World Trade Center memorial and struck several people, police and witnesses said. Two adults and two children were on the bus at the time. AP Photo/Bebeto Matthews New York Truck attack A young girl reacts to the scene A young girl reacts as police officers secure an area following a shooting incident in New York on 31 October 2017. Several people were killed and numerous others injured in New York on Tuesday after a vehicle plowed into a pedestrian and bike path in Lower Manhattan, police said. 'The vehicle struck multiple people on the path,' police tweeted. 'The vehicle continued south striking another vehicle. The suspect exited the vehicle displaying imitation firearms & was shot by NYPD.' DON EMMERT/AFP/Getty Images New York Truck attack Police officers arrive at the scene Police officers arrive at the scene following a shooting incident in New York on 31 October 2017. Multiple people were hurt in downtown Manhattan, US media reported after police confirmed that they were responding to reports of a shooting. Police said they had mobilized to the scene in Lower Manhattan and that one person was in custody, giving no further details. DON EMMERT/AFP/Getty Images New York Truck attack Emergency personnel respond to truck attack in lower Manhattan Emergency personal respond after reports of multiple people hit by a truck after it plowed through a bike path in lower Manhattan on 31 October 2017 in New York City. According to reports up to six people may have been killed. Kena Betancur/Getty Images

The attack did little to deter another young woman, 36-year-old Shalane Flanagan, who won Sunday’s marathon with a time of 2 hours, 26 minutes and 53 seconds. She became the first US woman to win the marathon in 40 years, and unseated three-time defending champion Mary Keitany of Kenya. The Massachusetts native crossed the finish line with tears in her eyes, pointing and shouting excitedly.

Hours later, as a drizzly rain fell on the streets of New York, even more tears were being shed, and more shouts being called, as runners continued to cross the finish line and meet up with their family members.

Matt Rouse, shaking and wrapped in a marathon-branded poncho, met up with his wife, Gina, to minutes after he finished. They had left their three kids with his parents at home in Tennessee so she could come watch him. When he heard about the New York terrorist attack, he said, he was more worried about the safety of his wife waiting in the stands than himself on the trai.

But Ms Rouse said she wasn’t worried at all.

“The security was just everywhere; NYPD casing the whole place,” she said. “

“They didn't even want to let me in the park – Which was good!” she added with a laugh.

Along with the officers lining the event, checking bags and even patting down entrants, the NYPD staged more sand trucks and vehicles along the course than ever before. Mr Gomez said they had more than doubled the number of rooftop observation teams and counter-sniper teams, and also deployed heavy weapons teams and police dogs throughout the city.

June Minter, who was visiting from London to watch her daughter and son-in-law run, said she appreciated the enhanced security at the marathon. But in the end, she would always have been there, with or without it.

“Living in London, we've got used to this I think – which is a terrible thing to say,” she said.