President Trump slammed Gov. Andrew Cuomo and Mayor Bill de Blasio for “weak leadership” after two cops were shot in the Bronx this weekend.

“I grew up in New York City and, over many years, got to watch how GREAT NYC’s ‘Finest’ are. Now, because of weak leadership at Governor & Mayor, stand away (water thrown at them) regulations, and lack of support, our wonderful NYC police are under assault,” Trump wrote on Twitter Sunday. “Stop this now!”

The president’s posting comes just hours after a gunman walked into the 41st Precinct in the Bronx and began blasting away.

NYPD officers took the man into custody after he slid his gun away and surrendered.

Just hours earlier, an on-duty NYPD officer sitting with his partner in a marked patrol van near the Hunts Point Avenue subway station in the 41st precinct was shot in the face Saturday night by a gunman who fled the scene.

Commissioner Dermot Shea said the officer, who survived but is hospitalized, was targeted.

“Let me be very clear: this was an assassination attempt of two New York city police officers,” Shea said.

Police believe the gunman in both instances may be the same person.

Shea brushed off a question about Trump’s tweet.

“I’m not getting into that. This is about our officers,” he said Sunday.

In a statement, the governor said he has asked the State Police to offer the NYPD any assistance it needs.

“We have zero tolerance for attacks of any kind against law enforcement, and the person or people responsible will be held accountable to the fullest extent of the law,” Cuomo said in the statement.

Dani Lever, his communications director, responded to Trump.

“We‘d think politicizing police shootings would be beyond the pale even for @realDonaldTrump, but apparently there’s nothing too low for him,” she wrote on Twitter.

Last summer, numerous scofflaws doused cops with water across the city.

Trump has been feuding with Cuomo and de Blasio after his administration banned New Yorkers from enrolling in its Trusted Traveler Programs because of a state law that gives drivers’ licenses to illegal immigrants.