Members of the New York City Police Department were hospitalized and multiple people were arrested after a party erupted into violent attacks against the officers.

Three NYPD police officers were hospitalized for injuries sustained over the weekend as “cop-hating mobs” hurled insults and objects at law enforcement called in to deal with a party that had gotten unruly, the New York Post reported.

(Video: Twitter

The violent turn of events at the Brooklyn housing projects, which included police using pepper spray and nearby gunshots ringing out, ended with 11 people being arrested on charges of disorderly conduct by early Sunday.

Videos from the Saturday night scene showed one injured police officer who had to be lifted onto a gurney to be taken to the hospital from outside Marcy Houses in Bedford-Stuyvesant.

#NY1 in Bed-Stuy #Brooklyn where cops were shot at last night.

They were trying to breakup fights & things got chaotic near Bainbridge & Thomas S Boyland Streets. No injuries. Several arrests.@NY1 pic.twitter.com/e6fJlwjUai — Amy Yensi (@amyyensi) August 18, 2019

Residents claim they were celebrating their annual “Marcy Day” celebrations with barbecues and parties on Saturday when police officers began using pepper spray to disperse crowds.

“Everyone was just having their fun, no gang-banging … everyone sitting around, enjoying Marcy Day,” a woman who lives in the Marcy Houses project told the New York Post.

“Everyone having cookouts and stuff,” she added, claiming police “just started pepper spraying.”

But police had reportedly tried to break up larger crowds as fights broke out and things began to get out of control. They used the pepper spray when they were apparently unsuccessful in their attempts to disperse the groups.

Residents began to throw projectiles at police, including “air mail” objects like rocks and glass bottles that were hurled down at cops from rooftops, police at the scene told The Post. Videos posted online showed some of the chaos that erupted as angry mobs of people turned on law enforcement officers and arrests were made.

Video: Welcome to Bed-Stuy. Another night filled with chaos after shots fired at NYPD Police Officers, massive response including ESU and K-9, the Tasers come out, people get maced, multiple arrests, lots of pushing, shoving and fights. https://t.co/Q2EmO85OAa — NYC EMS Watch (@NYCEMSwatch) August 18, 2019

RT CitizenApp_NYC: (Ocean Hill, Brooklyn) Shots Fired at Police — Officers are blocking access in or out of a perimeter established near Saratoga Ave & Bainbridge St following the shooting. No injuries have been reported yet. Updates here: … pic.twitter.com/fjimaS3Ifn — kaihsing (@kaihsing) August 18, 2019

“Straight up cowards!” a man shouted at police just after midnight, according to The Post. “You don’t know how to do anything, you f**king coward!”

A pursuit of one man by police was caught on video as well.

The actual foot pursuit pic.twitter.com/PlvY4216em — NYC Scanner (@NYScanner) August 18, 2019

Officers also rushed toward gunfire after several shots were heard from a rooftop nearby. No injuries were reported from that incident but the volatile scene continued well into Saturday night, with “small roving bands of angry residents” still “taunting” police after midnight in the surrounding area, according to The Post.

“It was a busy night in Brooklyn,” a police source told the newspaper after this weekend’s violent incidents.

Five people were arrested in connection with the gunshots being fired, possibly aimed at police, just before 2 a.m on Sunday, according to WPIX-TV which reported that police recovered bullet casings and fragments from the area. Police used a taser on one man, who was charged with assaulting a police officer, disorderly conduct and obstructing governmental administration, according to the Daily News. Another two men were slapped with the same charges as well as unlawful possession of marijuana and cocaine.

Fox News contributor and former Secret Service Agent Dan Bongino reacted to the reports of the injured NYPD officers over the weekend, bashing New York City Mayor Bill de Blasio on Monday morning for endangering police officers with his far-left policies.

“These stories make me sick,” the former NYPD officer told “Fox & Friends” on Monday, accusing the 2020 Democratic candidate of fostering an “anti-cop” environment in order to boost his own political career.

(Video: Fox News

“This disgusting, gross, unforgivable anti-cop atmosphere permeating down from the top of New York City is a danger to every cop out there. And what’s even worse about it is the failed communist mayor of New York, de Blasio, he understands [it]. This is not a dumb guy,” Bongino said.

“He’s not stupid,” he continued. “He understands that using the cops as a whipping boy is a political tactic for him to gain favor amongst his far-left base … With this de facto ‘screw the cops’ attitude… he’s doing it strictly for his own political career.”

The angry outbreak against the officers comes amid viral videos in the last few weeks showing New York City police being doused by water.

NYPD Chief Terence Monahan condemned the water attacks last month, urging that “EVERY New Yorker MUST show respect for our cops.” De Blasio called the attacks “completely unacceptable” though he, in turn, has been blasted for not having the NYPD’s back.

Patrick Lynch, the president of the Police Benevolent Association slammed the “complete lack of leadership from City Hall” for the incidents even as the state’s Democratic Gov. Andrew Cuomo blamed police, calling them “impotent” in the face of the water attacks.

Andrew Cuomo blames cops getting pelted with water buckets, belittles ‘impotent’ NYPD as wimps https://t.co/SJDtgpbohp pic.twitter.com/oSQzHIN63Y — Conservative News (@BIZPACReview) August 6, 2019

“Since Mayor de Blasio [has been] in office, it’s affected the psychology of the workforce,” Bongino said on Fox News. “Imagine where we work if every time you came on the air, every single day someone told you … you’re terrible … You’re awful at this. Eventually, you go to work, you’ll show up. You’ll do what you have to do — but you just can’t stand it.”

“We’ve seen what — nine suicides of police officers this year? I’m not pinning those on de Blasio. I’m simply saying I know cops. I talk to them,” he added. “They are miserable working for this mayor. They have no leadership at all.”