Police Commissioner James O’Neill on Monday took aim at the police union that has been blasting him over the disrespect NYPD officers are facing on Big Apple streets — even calling the union’s chief a “keyboard gangster” for his tough-talking rhetoric.

The Sergeants Benevolent Association has been hammering the city’s top cop and demanding the mayor “REMOVE O’NEILL!” after a series of embarrassing incidents in which members of the public have verbally lashed uniformed police or doused them with water.

On Sunday, the union implied that a gang-related shooting at a Brownsville block party on Saturday that left one person dead and 11 injured was somehow related to an incident a week prior in which young men were videotaped a mile away in an adjacent precinct dumping buckets of water on two cops with impunity.

But O’Neill slammed SBA honcho Ed Mullins on Monday for trying to whip up fear even as the city’s crime rates hit rock bottom.

“He’s a bit of a keyboard gangster,” O’Neill told reporters of Mullins, following an NYPD promotion ceremony. “We’re here to keep the cops safe, and if you want to second-guess us, think we don’t care about cops, man, you are dead wrong. You’re in the wrong business. He should rethink his position.”

Combating Mullins’ narrative that Gotham is returning to the bad old days, O’Neill cited record-low crime figures as he addressed officers ahead of their promotions.

“This is a vastly transformed New York City. At its peak, its peak, there were 2,245 homicides in New York city in 1990. That’s six a day. Now, in 2019, it’s less than one a day. At its peak, there were 5,000 shootings. That’s 13 a day. Today, it’s about two a day,” he fumed.

“We didn’t get here because we don’t know what we’re doing. We got here because we’re dedicated to the people in this city. Nobody takes this job just for a paycheck. We’re not victims. Cops aren’t victims.”