President Trump Donald John TrumpBubba Wallace to be driver of Michael Jordan, Denny Hamlin NASCAR team Graham: GOP will confirm Trump's Supreme Court nominee before the election Southwest Airlines, unions call for six-month extension of government aid MORE drew a round of applause from law enforcement officials on Friday after he took a swipe at mayors who don't let police "do their job."

"I've met police that are great police that aren't allowed to do their job because they have a pathetic mayor or a mayor that doesn't know what's going on," Trump said in a speech in Long Island, N.Y., eliciting applause from a crowd of police officers standing behind him.

"Were you applauding for someone in particular?" Trump asked with a smile, shaking his head. The jab was interpreted by some as a veiled swipe at New York City Mayor Bill de Blasio Bill de BlasioNew York to honor Ginsburg with statue in Brooklyn The Hill's Morning Report - Sponsored by The Air Line Pilots Association - White House moves closer to Pelosi on virus relief bill New York again pushes back in-person classes MORE.

ADVERTISEMENT

De Blasio has had a particularly strained relationship with New York City Police officers, who have accused the mayor in the past of helping breed anti-police sentiment in the city.

The NYPD did not attend the event, which was not held within New York City boundaries.

Trump's address to law enforcement on Friday focused on his administration's efforts to crack down on gang violence, particularly the MS-13 gang, which has a sizable presence in New York.

In the speech, the president harangued politicians, whom he accused of stymying police officers' ability to do their jobs.

"They're there right now because of weak political leadership, weak leadership, weak policing and, in many cases because the police weren't allowed to do their job," Trump said, referring to MS-13.