This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

BROOKLYN — Two offers were attacked from behind while attempting to detain an allegedly unruly man in Brooklyn, and the entire melee was caught on surveillance cameras, PIX11 learned Friday.

Video showing an attack on police officers in Brooklyn on Oct. 15, 2019, NYPD officials said.

The violent brawl happened near Vernon and Lewis avenues around 5:27 p.m. on Tuesday, according to NYPD officials.

Two officers were conducting patrol when police said they spotted Bryan Williams, 29, drinking alcohol from an open container. As officers approached, Williams fled, according to police.

Officers were able to apprehend Williams and put him in handcuffs when he began to resist, according to police.

At that point, another man — 37-year-old Darnell Brown — began attacking the officers before fleeing, according to police.

Surveillance footage provided to PIX11, and seen in the video below, captured the assault.

Both Williams and Brown were later arrested.

Williams faces charges including robbery, assault on a police officer, resisting arrest, obstructing governmental administration, assault, unlawful possession of marijuana, alcoholic beverage public consumption and disorderly conduct, police said.

Brown faces robbery, assault on a police officer, obstructing governmental administration and harassment charges, according to police.