A former NYPD officer will spend 10 years in prison for his attack on police during the January 6th insurrection, the longest term handed down so far to any of the U.S. Capitol rioters.

Thomas Webster was sentenced in federal court on Thursday, four months after becoming the first of the January 6th defendants to be convicted of felony assault of an officer. U.S. District Court Judge Amit Mehta said the 56-year-old Webster’s conduct was among the most egregious acts of violence committed against law enforcement during the deadly riot.

Videos showed him charging at a group of officers guarding the capitol, slamming a Marine Corp flag pole onto a barricade, then tackling D.C. police officer Noah Rathbun. During the trial, Rathbun testified that Webster ripped off his gas mask, choking him with the chinstrap while forcing him to inhale tear gas.

Webster maintained that he was acting in self-defense, at one point claiming that he ripped off Rathbun’s gas mask because he didn't want him to think he was taking his gun.

“Not knowing where [an attacker’s] hands are [is] scary, and feeling a tug on your gun belt or something like that, I kind of just, like, wanted him to see my hands,” Webster testified.

A resident of Goshen, N.Y., Webster served in the Marines, before joining the NYPD in 1991. He later served Mayor Michael Bloomberg’s personal security detail.

In their sentencing memo, prosecutors argued that Webster's years of police and military service only made his actions more troubling.

“It is particularly disturbing,” they wrote, “that a former NYPD officer, once responsible for manning bike-back barricades and protecting dignitaries, would help lead the breach of the barricades outside the U.S. Capitol.”

An attorney for Webster didn’t immediately respond to a request for comment.