An Everett man is in custody after a New Year’s attack on a Boston Police officer that was captured on camera.

Around 2 a.m. on Jan. 1, a man, later identified as 23-year-old Andrew Bowman of Everett, approached a parked cruiser near the One City Hall Plaza parking garage and shouted at the officer sitting inside, according to a police report.

“You heard about the war, right?” the suspect reportedly yelled, then began punching the officer in the face through an open driver-side window, police said.

Footage captured across the street, which BPDposted online on Saturday, shows the incident in progress, though it has no sound. It had nearly 20,000 views on YouTube by Sunday afternoon.

The suspect fled into a parking garage after the officer fought back by punching the suspect, according to the report.

Back-up officers later arrested Bowman, who police described as combative, as he tried to scale a fence and shouted “You are all doomed, and you're going to die. They told me to do this,” according to the report. The officers made the arrest using “empty-hand control tactics” and without using weapons, the report said.

“This officer displayed incredible restraint, defending himself without the use of a baton, pepper spray or deadly force, even though the situation may have warranted it,” Police Commissioner William Evans said in a statement, adding that the officer “is going to be okay.”

The incident came during an “otherwise peaceful” New Year’s Eve, Evans said.