Unless Congress can agree in coming weeks on funding anti-terrorism grants to the nation’s municipalities, “New York City will become less safe,” Mayor Bill de Blasio said Wednesday.

Speaking at an NYPD surveillance post in lower Manhattan, de Blasio and other local officials said they hoped to see no cuts for a post-9/11 program to help offset security costs.

“If Congress doesn’t act, there’re going to be a lot of happy terrorists out there in the world, because they’re going to have a chance to come at us with less of our defenses up,” he said.

Called the Urban Area Security Initiative, the program awards grants of about $600 million nationwide. The cuts would leave funding at about $330 million, according to the officials. New York City currently receives about $180 million under the program. That number could fall to about $100 million, according to Mark McCoy Snyder, an aide to Rep. Steve Israel (D-Huntington), who was at the NYPD news conference.

Israel’s office said the current version of the bill, with the full funding, has “ideological policy provisions” — riders — “on issues like immigration.” Israel wants the bill passed without the riders.

“We need to put politics aside and pass the $600 million and pass it in a clean way — not with riders, not with poison pills,” Israel said.

advertisement | advertise on newsday

NYPD Commissioner William Bratton declined to say exactly what would be cut if the funding isn’t restored.

“We’ll cross that bridge when we come to it,” Bratton said.

Rep. Kathleen Rice (D-Garden City) called the possibility that anti-terror money might not pass “pathetic” — and noted that the threatened cuts would also impact other cities that are would-be terror targets.

The White House and New York officials engaged in a public spat earlier this year: President Barack Obama’s administration said that, of the $760 million homeland security grants given to the state and city over the past several years, about $620 million has not yet been spent.

Speaking Wednesday, de Blasio called the White House’s accounting claims “ridiculous.”

“Every dollar has been spent or is being spent,” de Blasio said.

Bratton disputed the Obama administration’s position as “smoke and mirrors” and blamed the White House budget office for being “very cute” in suggesting that New York was leaving money unspent.

“He started this whole mess,” Bratton said of Obama.

White House spokesman Peter Boogaard did not directly address Wednesday’s criticism, but pointed to remarks earlier this year on the controversy by Obama press secretary Josh Earnest.

In February, Earnest said New York receives more anti-terror money than any other municipality in the country.