An on-duty New York Police Department officer was attacked and smacked in the head with a bottle in an attack by a random passerby that was caught on video.

In a video first obtained by New York Post, the female officer can be seen standing near 231st Street and Broadway in the Bronx on Monday while officers were conducting smoke shop inspections before a man blindsides her and hits her in the back of the head.

The footage shows the man continuing to go after the officer as other officers try to pull him away.

The NYPD confirmed to Fox News Digital that an "on-duty female police officer" was struck in the head by a bottle and taken to St. Barnabas Hospital.

MOM OF MURDERED VETERAN TORCHES DEMOCRATS FOR HELPING TO 'SELF-DECIMATE' BLACK COMMUNITY WITH SURGING CRIME

NYPD attack still

The NYPD says that 45-year-old Jose Garcia was arrested for attacking the officer (New York Post)

The department said the officer’s condition is stable and that the suspect was arrested at the scene.

That suspect, according to police, is 45-year-old Jose Garcia who lives in the Bronx.

STEFANIK TO JOIN JORDAN FOR FIELD HEARING ON NEW YORK CITY’S ‘CRIME CRISIS’

NYPD car

An on-duty New York Police Department officer was attacked and smacked in the head with a bottle in an attack by a random passerby that was caught on video. (Michael Nagle / Bloomberg via Getty Images / File)

Garcia was charged with assault, obstruction of government administration, resisting arrest, menacing, criminal possession of a weapon and harassment.

The Post reported that Garcia has been arrested 11 times in the past.

The attack comes about a week after Manhattan District Attorney Alvin Bragg called his home the "safest big city in America" after Republicans blamed his progressive policies for contributing to violent crime. 

ALVIN BRAGG PROTESTER BOOTED FROM HOUSE JUDICIARY HEARING: ‘YOU ARE UTTERLY DISGRACEFUL’

District Attorney Alvin Bragg speaks

Manhattan District Attorney Alvin Bragg (Alex Kent / AFP via Getty Images / File)

The attack came the same day that the mother of a New York City murder victim shouted down a Democrat lawmaker in New York City while testifying in a Republican-led field hearing on Bragg's policies and warned him not to "insult my intelligence."

"Real people are affected by this. Alvin Bragg dismissed both murder and gang assault indictments against two people," said Madeline Brame, whose son, Army Sgt. Hason Correa, was fatally stabbed in Harlem in 2018.

"One is currently walking the street amongst us. … They brutally ambushed and butchered my son to death nine times and then turned and butchered his father 12 times when he tried to come to his aid."

CLICK HERE TO GET THE FOX NEWS APP

Bragg's office posted on Twitter during the day of the hearing to say that Republicans were engaging in a "political stunt" that was a "slap in the face to the dedicated NYPD officers, prosecutors, and other public servants who work tirelessly every day with facts and data to keep our home safe."