The Proud Boy charged for a violent brawl near an Upper East Side Republican club testified Thursday that he pummeled a counter-protester out of fear for his own safety.

“I had to protect me and my friends because they were attacking us,” Maxwell Hare told jurors in Manhattan Supreme Court. “They were going to hurt us.”

The Oct. 12, 2018, altercation unfolded after a group of far-right Proud Boys heard their founder, Gavin McInnes, speak at the Metropolitan Republican Club. About 60 protesters, including leftist antifa members, were gathered behind barricades across the street.

To avoid a clash between the conservative group and the protesters, police directed the Proud Boys to head west on 83rd St. then south on Park Avenue, while they guided the demonstrators in the opposite direction.

As the Proud Boys approached E. 82nd St., they spotted six suspected antifa protesters, wearing black masks that obscured their faces and dark clothes, headed toward them.

Hare said he clapped his hands to alert his comrades, as he heard his opponents repeatedly snarl, “You’re dead.”

He then advanced toward the suspected antifa protesters as “something whizzed by my head.”

He didn’t know at the time it was a plastic bottle.

Within seconds, the two groups descended into a wild brawl — stomping, kicking and slugging each other.

The alleged victims refused medical treatment, and police were never able to identify them.

Hare later pointed out two men and one woman with whom he scuffled in footage taken outside the Republican club before the brawl.

In that video, the suspected atifa members were wearing regular street clothes.

Hare, who works for Amtrak and lives in New Jersey, claimed that the Proud Boys are “[j]ust a group of blue-collar men that love America” — though they are also classified as an “extremist group” by the FBI.

In morning testimony, defense lawyers asked their witness, Proud Boy Christopher Wright, questions about the inclusiveness of the group — especially women and minorities, which opened the door to a damning cross-examination.

Assistant DA Joshua Steinglass was permitted to ask Wright about McInnes’ bigoted comments, including calling President Obama “his favorite monkey,” homosexuals “fags and deviants” and Asians “riceballs.” Jurors visibly reacted to the offensive statements.

Wright claimed that McInnes was engaged in satire and added, “It’s controversial, of course, but that’s how comedy usually is.”

Hare and co-defendant John Kinsman are on trial for attempted gang assault, attempted assault and riot. 10 Proud Boys were arrested in connection to the melee, seven of whom have taken plea deals.

An eighth is awaiting trial.

Hare’s testimony continues Tuesday morning before Justice Mark Dwyer.