Police will be out in full force — on streets, bridges, rooftops, in the air and on the sea — to keep runners and spectators at the New York City Marathon safe, NYPD officials said Wednesday.

NYPD Commissioner James O’Neill said authorities are not aware of any specific, credible threats to Sunday’s marathon, but the 51,000 runners and 2.5 million spectators expected to participate in the world-famous race will see an overwhelming police presence throughout the course.

“This is our job, to keep people safe,” O’Neill said during a news conference in Central Park Wednesday, not far from the marathon finish line. “The bottom line is the New York City Marathon is one of the most well-policed, best-protected events anywhere in the nation.”

The New York City Marathon is especially difficult for police because it snakes through all five boroughs for more than 26 miles, O’Neill acknowledged. Unlike other big events, such as the Thanksgiving Day Parade or the New Year’s Eve celebration in Times Square, it is not limited to an easily secured geographic area. “It is a challenge,” O’Neill said.

Nerves remain raw and frayed in New York and across the nation, moreover, in the wake of what officials deemed an anti-Semitic attack on a Pittsburgh synagogue on Saturday that left 11 people dead, as well as the pipe bombs mailed to prominent Democratic Party officials and CNN’s offices in Manhattan — just blocks from the marathon finish line.

The city is also still recovering from last year’s Halloween terror attack, when a man driving a pickup truck along a bike path by the Hudson River mowed down pedestrians and cyclists, killing eight people and injuring 11 others.

NYPD chief of department Terence Monahan said thousands of police officers, including heavy-weapons teams, K-9 units, bomb squad officers and other specialists, will be deployed along the marathon route Sunday. The department’s aviation unit and officers deployed on rooftops will monitor the route from above, while the harbor unit will protect waterways and bridges.

Plainclothes cops will fan out through crowds along the route to keep an eye out for problems, Monahan added.