Mayor de Blasio urged people – including President Trump – not to “politicize” the terrorist attack that left eight dead in lower Manhattan Tuesday.

“The last thing the president or anyone else should do is politicize this tragedy. We have to find out what happened here,” de Blasio said Wednesday morning on CNN. “That work’s going to be done by the FBI, by the NYPD and all of our partners to determine exactly who this man is, what moved him to this horrible act, what’s going on? Is there any bigger ramification? That’s what we should be focused on.”

The mayor warned against “casting aspersion on whole races of people or whole religions or whole nations,” saying it only makes the situation worse. He said “anyone who wants to come to this country should be very thoroughly vetted as an individual.”

Sources said Sayfullo Saipov, 29, was behind the deadly terror attack and left handwritten notes pledging allegiance to ISIS inside the Home Depot rental truck he used to ram people along a bike lane on the West Side.

“The minute you start generalizing it — especially to a whole religion — then unfortunately we’re sending the exact negative message that a lot of our enemies want sent,” de Blasio said. “The terrorists want to affirm that this nation is somehow anti-Muslim. We’ve got to do the exact opposite.”