The NYPD has opened an internal investigation into Sergeant Ed Mullins, the long-serving police union leader with a history of promoting racist content, over his recent declaration of "war" on Mayor Bill de Blasio, Gothamist has learned.

The NYPD's Internal Affairs Bureau launched the investigation into the Sergeant Benevolent Association president last week, according to a government source familiar with the matter. The inquiry was sparked by the SBA's recent tweet "declaring war" on the mayor, following the shooting of two on-duty cops.

The probe will include a "deeper dive" into Mullins's history of offensive statements, and "whether those views undermine his capacity as a sergeant," according to the source.

Mayor DeBlasio, the members of the NYPD are declaring war on you! We do not respect you, DO NOT visit us in hospitals. You sold the NYPD to the vile creatures, the 1% who hate cops but vote for you. NYPD cops have been assassinated because of you. This isn’t over, Game on! https://t.co/XyruPraM9T — SBA (@SBANYPD) February 9, 2020

Though his duties are primarily union-related, Mullins remains a sworn officer, and collects a taxpayer-funded salary of $133,524. His broadsides against perceived enemies of cops have frequently gained scrutiny for crossing a line into incitement and bigotry, even by the standards of police union bosses.

This past summer, Mullins made headlines for emailing an explicitly racist video to the SBA's 13,000 members that likened black people to "monsters" and public housing to a "war zone." Despite deeming it "the best video I've ever seen" and urging the sergeants to listen to every word, he later claimed to have not watched the full video.

The SBA's Twitter account, which is controlled by Mullins, has previously said that "Ferguson Missouri was a lie," suggested that college students who protest police are asking for mass shootings, and lashed out at a police oversight board for reminding New Yorkers of their constitutional rights.

The union leader has also been among the loudest voices opposing recent bail reform. And his campaign against fare-beaters and homeless people inside the subway system often involves shaming individual New Yorkers.

New York City: One bedroom, convenient transportation to D Train- NYC Subway, only $2.75 entrance fee unless of course you choose not to pay & prefer to jump turnstiles. If caught not paying $2.75 you will be given FREE Mets tickets. Welcome to NYC! Thank you Mayor DeBlasio pic.twitter.com/VPUrq85rt6 — SBA (@SBANYPD) February 19, 2020

Jeffrey Fagan, a law professor at Columbia University who specializes in police accountability and criminal law, said that Mullins's statements show that his responsibilities as a sworn officer are "compromised."

"There are clear signals that he makes assumptions about criminality when approaching certain groups of people," he said.

At the same time, Fagan said it would prove challenging for IAB to build a case against him for his attacks against de Blasio, given the vaguely worded threat likely qualifies as protected speech. A Lindsay-era executive order allows certain public sector union leaders to hold on to their city jobs while facilitating labor activities.

The NYPD's patrol guide prohibits all uniformed officers from "engaging in conduct prejudicial to good order, efficiency, or discipline of the Department," and also proscribes officers from knowingly associating with people who "disseminat[e] defamatory material," though there is no specified penalty for these offenses.

De Blasio, a longtime punching bag for Mullins, said the recent barrage of tweets sent by Mullins should result in "consequences," but repeatedly declined to elaborate on what that meant. "I just said what I'm going to say," the mayor said.

Your full of shit, say no more, people don’t believe you and have no faith in you. Your anti police policies have emboldened the criminal element to run freely, to rape,rob and murder. You have sided with criminals and placated the loud & unruly YOU have RUINED New York City. https://t.co/CM8Wv5D4y7 — SBA (@SBANYPD) December 12, 2019

You are all a disgrace. You sit on your ass and target the NYPD all while growing up on the nipple of what’s easy. You have no clue what a NYPD officer does yet target us and disparage our integrity. One day you will dial 911 when evil is at your door and thank god for the NYPD. https://t.co/8I00FD7hny — SBA (@SBANYPD) May 5, 2018

Asked about the IAB investigation, City Hall spokesperson Freddi Goldstein reiterated those calls for discipline.

"Ed Mullins is supposed to be a leader in this city," she said. "It’s time he act like it. His comments were clearly inappropriate and he should be held accountable.”

Inquiries to Mullins and the SBA were not returned. A spokesperson for the NYPD declined to comment.