President Trump appeared to deliver a blistering attack on Mayor Bill de Blasio during a speech about the MS-13 gang on Long Island on Friday, railing against a “pathetic mayor” who won’t let cops do their jobs.

“I’ve met great police who aren’t allowed to do their job because they have a pathetic mayor or a mayor who doesn’t know what’s going on,” Trump said, eliciting cheers from the crowd, to which he quipped: “Were you applauding for someone in particular?”

The mayor’s camp later said in a statement that it was clear Trump was referring to him — and used the call-out to try to cash in.

De Blasio’s campaign said in an e-mail to supporters that Trump’s speech was “incoherent” and asked for cash towards his re-election.

“Chip in $3 to Bill de Blasio’s re-election campaign as a way of saying we will never allow Donald Trump or one of his supporters to lead the largest and most diverse city in America. No way,” wrote campaign manager Rick Fromberg.

Hizzoner wasn’t around to hear the apparent diss.

Even though the self-proclaimed progressive leader flew 4,000 miles to protest Trump in Hamburg earlier this month, he couldn’t be bothered to continue holding up the mantle of discontent when the president was in his own back yard.

City Hall refused to say why de Blasio didn’t make the short trek to Brentwood to join several hundred protesters as Trump addressed a crowd in the heart of MS-13 gangland.

De Blasio administration officials later issued a release saying he was on his way to Boston for the weekend.

De Blasio wasn’t the only one missing in action: NYPD brass were too busy with promotion ceremonies to take part in the event, Police Commissioner James O’Neill said.

“We have a lot to do, a lot of work to do here in New York City. We have the promotion ceremony, and anybody we’d send out — we have two promotions, one at 10 and one at 2 o’clock,” O’Neill told reporters Friday.