President Donald Trump and New York City Mayor Bill de Blasio traded insults Thursday, with the commander in chief hitting his hometown’s leader over his reaction to a recent water-dousing attack on several police officers.

Trump called the incidents, videos of which took social media by storm this week, "a total disgrace."

One video shows people throwing buckets of water on a pair of police officers who had been making an arrest in Harlem. At one point in the video, someone throws an empty water bucket at an officer’s head.

Another video, shot in Brooklyn, shows several people tossing water on officers as they walk down a street.

“What took place in NYC with water being tossed on NYPD officers was a total disgrace,” Trump tweeted. “It is time for @NYCMayor @BilldeBlasio to STAND UP for those who protect our lives and serve us all so well,” Trump said in a tweet.

...What took place was completely unacceptable, and will not be tolerated. Bill de Blasio should act immediately! — Donald J. Trump (@realDonaldTrump) July 25, 2019

De Blasio fired back later Thursday.

“Crime’s gone down year after year in New York City and it’s not just because you finally left town,” de Blasio, a Democratic presidential candidate, tweeted.

Crime’s gone down year after year in New York City and it’s not just because you finally left town. https://t.co/sJXqu6hRY5 — Mayor Bill de Blasio (@NYCMayor) July 25, 2019

.@realDonaldTrump knows NOTHING about his hometown. He never lived a real New York City life. He should get off Twitter and stick to what he’s good at: watching TV when he claims to be working. — Mayor Bill de Blasio (@NYCMayor) July 25, 2019

De Blasio said crime fell in New York City because police and communities “worked together,” before directly hitting Trump.

“@realDonaldTrump knows NOTHING about his hometown,” de Blasio wrote. “He never lived a real New York City life. He should get off Twitter and stick to what he’s good at: watching TV when he claims to be working.”

Three people have been arrested in the water-dousing attacks, NBC New York reported Wednesday. They face charges including disorderly conduct, harassment, criminal mischief and obstructing government administration.

De Blasio on Monday called the dousing "completely unacceptable."

"The NYPD kept New Yorkers safe through the heatwave and last night's outages," he tweeted. "We won't tolerate this kind of disrespect."