Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A day after President Donald Trump told America's law enforcement officers not to be "too nice" to suspected criminals, the head of the nation's largest police force slammed the remarks as "irresponsible" and "unprofessional."

James O'Neill, the police commissioner of the New York Police Department, stressed Saturday that there are policies and procedures in place that limit the use of force "under any circumstance."

"To suggest that police officers apply any standard in the use of force other than what is reasonable and necessary is irresponsible, unprofessional and sends the wrong message to law enforcement as well as the public," O'Neill said in a statement.

At a Friday event meant to highlight the wave of MS-13 gang violence on Long Island, New York, Trump encouraged officers to be tougher when arresting suspected gang members.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"When you see these thugs being thrown into the back of a paddy wagon — you just see them thrown in, rough," Trump said during a rally in Suffolk County. "I said, 'Please don't be too nice.'"

"Like when you guys put somebody in the car and you're protecting their head," Trump continued. "The way you put their hand over — like, don't hit their head and they just killed somebody, don't hit their head. I said, 'You can take the hand away, OK?'"

Members of the Suffolk County Police Department attending the event, which was hosted at Suffolk County Community College, tepidly applauded behind the president.

In 2016, former Suffolk County Police Chief James Burke pleaded guilty to beating a handcuffed man being interrogated about the theft of sex toys and other personal items from Burke's SUV, NBC New York reported.

A few hours after Trump's remarks, the department issued a statement that it does not tolerate abuse of prisoners.

"The SCPD has strict rules & procedures relating to the handling of prisoners," the statement said. "Violations of those rules are treated extremely seriously. As a department, we do not and will not tolerate roughing up of prisoners."

As a department, we do not and will not tolerate roughing up of prisoners. — Suffolk County PD (@SCPDHq) July 28, 2017

During the speech, Trump also took a veiled dig at New York City Mayor Bill de Blasio, and blamed the rise in illegal immigration and violence in communities such as Long Island on an unnamed "pathetic mayor." New York is a so-called "sanctuary city," considered a safe haven for undocumented immigrants because they aren't being targeted over their legal status.

The Trump administration has called for denying federal grant money to such cities.

"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 doesn't know what's going on," Trump said to applause.

"Were you applauding someone in particular?" he joked. "It's sad. It's sad. You look at what's happening it's sad. But hopefully — certainly in the country, those days are over."

The president notably encouraged violence at some rallies during his 2016 presidential campaign. At an event in Iowa, he encouraged supporters to “knock the crap” out of anyone they see throwing a tomato.

He also offered to pay the legal fees of anyone who assaulted protesters, and at one point said his staff was looking into supporting a man caught on tape sucker-punching a protester at a North Carolina rally.