An "Antifa militant" was sentenced to nearly six years in prison Friday for striking a man in the back of the head with a baton from behind during a headline-grabbing riot in Portland, Oregon, over the summer.

Gage Halupowski, 24, pleaded guilty to second-degree assault in connection with the June 29 attack on Adam Kelly, the Oregonian reported. Authorities said Halupowski was identified on video hitting and pepper-spraying Kelly after he appeared to come to the aid of another man who'd been attacked during the protests, the paper reported.

Antifa are masked, black-clad leftists who claim they're "anti-fascist" but repeatedly have been caught on video ganging up on and beating up just about anybody who stands in their way.

Kelly wrote on Facebook at the time that he needed 25 staples to close his head wounds and suffered a concussion, the Oregonian said.

Multnomah County Deputy District Attorney Melissa Marrero said Halupowski hitting Kelly in the back of the head with an expandable baton was “completely unexplainable, completely avoidable and didn't need to happen," the paper said, and that Kelly and Halupowski both are lucky that Kelly survived.

'A really terrible decision'

While defense attorney Edward Kroll said Halupowski made “a really terrible decision," and Kelly didn't deserve the attack, he added that his client's plea deal was “one of the harshest sentences I've seen for someone with no criminal background and young age," the Oregonian reported.

Kroll also said Halupowski hit Kelly once and that at least two other people hit him in the head with batons, the paper said.

Marrero said the charges and sentence against Halupowski were appropriate based on the severity of Kelly's injuries and Halupowski's strike — and that first-degree assault, which could mean a 90-month sentence, and riot charges were initially considered, the Oregonian noted.

She also said another person has been indicted and more are under investigation, the paper reported.

“My office has individuals charged on both sides of the political spectrum. We are not picking sides based on political affiliation, political views or anything like that," Marrero said.

Anything else?

Court documents indicate a Portland police officer saw Halupowski hit Kelly and pointed him out to other officers who helped arrest him, the Oregonian said, adding that Halupowski was accused of punching another officer in the arm while being taken into custody.

Additional charges of unlawful use of a weapon, attempted assault of a public safety officer and interfering with a peace officer were dropped as part of Halupowski's plea deal, the paper said.

At least eight people were injured, the Oregonian noted, including three police officers and conservative writer Andy Ngo.

Here's another video of the attack on Kelly from a different angle: