President Donald Trump speaks at Suffolk Community College on July 28, 2017 in Brentwood, New York. Spencer Platt/Getty Images President Donald Trump wasn't being serious when he seemed to endorse rougher treatment of suspected criminals last week, White House press secretary Sarah Huckabee Sanders said on Monday.

"I believe he was making a joke at the time," Sanders said at a press briefing.

Trump earned widespread criticism for his comments, made on Friday during a speech to law-enforcement officers in Brentwood, New York. In an unscripted rant, Trump said police shouldn't be "too nice" with suspects as they're placing them in the backs of police cars.

"Like when you guys put somebody in the car and you're protecting their head, you know, the way you put their hand over. Like, 'don't hit their head,' and they've just killed somebody," Trump said, as law-enforcement officers in attendance broke out in cheers and applause. "'Don't hit their head.' I said, 'You can take the hand away.' OK?"

Several police departments, including those in New York, Los Angeles, and New Orleans, released statements over the weekend denouncing the president's comments.

"The President's comments stand in stark contrast to our department's commitment to constitutional policing and community engagement," New Orleans Police Department chief Michael Harrison said on Saturday.

A familiar excuse

In claiming Trump's remarks were a joke, the White House retreated to a familiar tactic to excuse the president's controversial, off-the-cuff statements.

It's the same one Health and Human Services secretary Tom Price used on Sunday to dismiss Trump's vow to fire him if he couldn't corral enough Republican votes to repeal the Affordable Care Act.

"Oh, I think that statement was a humorous comment that the president made, but I think what it highlighted is the seriousness with which he takes this issue," Price said on ABC.

Last month, then-press secretary Sean Spicer argued that Trump was "joking" in 2016 when he urged Russian hackers to go after Hillary Clinton's emails.

"He was joking at the time,” Spicer said at a press conference. "We all know it."

President Donald Trump delivers remarks at the 2017 National Scout Jamboree in Summit Bechtel National Scout Reserve, West Virginia, U.S., July 24, 2017. REUTERS/Carlos Barria And Trump himself used the "just-kidding" excuse on multiple occasions during the presidential campaign, like in August 2016, when he made the shocking claim that Barack Obama was "the founder of ISIS."

"Ratings challenged @CNN reports so seriously that I call President Obama (and Clinton) 'the founder' of ISIS, & MVP. THEY DON'T GET SARCASM?" Trump said in a tweet.

Trump also claimed he was joking when he erroneously claimed in a 2012 tweet that "The concept of global warming was created by and for the Chinese in order to make US manufacturing non-competitive."

"I often joke that this is done for the benefit of China," Trump told the hosts of "Fox and Friends" in January 2016. "Obviously, I joke. But this is done for the benefit of China."

And in an interview with a Wisconsin TV station in March 2016, Trump dismissed lewd comments he's made about women over the years.

"Well, number one, I'm no different than anybody else, and people joke, and I joke," Trump told the local FOX 11 station. "And I never knew I was going to be running for office. And you joke, and you kid and say things, but you're not a politician so you never think anybody cares."