In a city shaken by its deadliest terrorist attack since 9/11, police are promising an unprecedented security effort to try to secure a soft target spanning five boroughs and 26.2 miles: the New York City Marathon.

City officials have sought to calm the nerves of more than 50,000 runners and huge crowds of onlookers expected to line the marathon route by insisting it will go off Sunday without a hitch only days after a truck attack killed eight people in lower Manhattan.

The security detail will include hundreds of extra uniformed patrol and plainclothes officers, roving teams of counterterrorism commandos armed with heavy weapons, bomb-sniffing dogs and rooftop snipers poised to shoot if a threat emerges.

The Police Department is also turning to a tactic it has used to protect Trump Tower and the Macy's Thanksgiving Day Parade: 16-ton sanitation trucks filled with sand. The trucks, along with "blocker cars," will be positioned at key intersections to try and prevent anyone from driving onto the course.

Marathoners from around the world who have been streaming into the city in anticipation of the race expressed mixed feelings about running so soon after the carnage.

"I can be really scared of it when I am at home and in front of the TV," Annemerel de Jongh, 28, of The Hague, Netherlands, said Thursday as she picked up her race number at a Manhattan convention center. "But when I am running I feel maybe a little bit invincible, like nothing can happen to me. I can run away from it."

The New York Police Department said it has no information pointing to any credible threat against the race.

There is no question, though, that the course provides a security challenge, even for a police department with 35,000 officers.

The race starts in a relatively secure location. Runners gather at Staten Island's Fort Wadsworth, a former military installation now partially occupied by the U.S. Coast Guard.

From there, though, the race heads through residential neighborhoods with hundreds of spots where an attacker could steer a vehicle onto the thickly packed course. Streets leading to the course are closed, but on many of them, in most years, the only barrier is a blue, wooden sawhorse and a thin plastic tape.

The crowd is so big, runners start in waves, meaning some people will still be standing on the starting line while competitors in the wheelchair division are crossing the finish.

"It will be an extraordinary event, as it always is," Mayor Bill de Blasio said this week at a news conference. "It will be well protected, as it always is."

Police said they'll use more of the blocker vehicles for the marathon than they've ever used for any other event.

Gov. Andrew Cuomo said the state police, the National Guard, the state Office of Emergency Management and other agencies will provide added security. Cuomo, a Democrat, said the state police will double the number of troopers posted at high-profile locations, including Kennedy and LaGuardia airports.

The attack Tuesday, on a bicycle path miles from the marathon route, was a grim reminder of how the Islamic State group is using its propaganda to encourage radicalized "lone wolves" to cause harm with unsophisticated means in easily accessible settings.

The attack by an alleged Islamic State group supporter "appears to have followed, almost exactly to a T, the instructions ISIS has put out in its social media channels," said the NYPD's top counterterrorism official, John Miller.

An online Islamic State group magazine posted last year extolled using trucks to kill innocent victims, saying, "Vehicles are like knives, as they are extremely easy to acquire." It also advised "surveying the route for obstacles, such as posts, signs, barriers, humps, bus stops, dumpsters, etc. which is important for sidewalk-mounted attacks."

Investigators say there's evidence the suspect, 29-year-old Sayfullo Saipov, did reconnaissance before driving a Home Depot rental truck through an unobstructed entry to a bike path in lower Manhattan and mowing down cyclists and pedestrians. A police officer shot and wounded Saipov before he was arrested and charged with supporting terrorism and other federal counts.

The shift away from sophisticated large-scale attacks like the one on the World Trade Center's twin towers on Sept. 11, 2001, to smaller ones on soft targets has forced law enforcement to become more adept at how to prevent and respond to terrorism, said Karen Greenberg, director of Fordham Law School's Center on National Security.

"I don't think people should be worried," Greenberg said. "The police know what they are doing. Look at how few successful attacks there have been."

Safety adjustments made by organizers of the New York City Marathon following the bombing of the Boston Marathon in 2013 — like banning backpacks and costumes — remain in place, said Chris Weiller, spokesman for New York Road Runners. Despite widespread news reports and images of the trail of bodies left by the truck attack, the cancellation rate has remained about the same, he said.

Boston Marathon organizers, working with local, state and federal law enforcement, also significantly enhanced security along the course after the 2013 attack, including more officers deployed on race day, a no-fly zone over the course and drones to help with surveillance.

New York Marathon entrant Kris Ledegen, 49, of Herdersem, Belgium, said he never considered skipping the race. One of the women killed in Tuesday's attack was from Belgium. The country was also the scene of an attempted car attack this year in Antwerp.

"It happened here, and it happened in Belgium as well already," Ledegen said. "So it can happen anywhere."


Associated Press writer Rebecca Gibian contributed to this report.