(The Hill) — A Kentucky man charged for using pepper spray against law enforcement officers and carrying a Confederate flag while storming the Capitol on Jan. 6, 2021, was sentenced Monday to over two years in prison.

Isreal James Easterday, 23, was sentenced to two and a half years in prison and 500 hours of community service. He was also ordered to pay $2,000 in restitution, according to a release from the U.S. Attorney’s Office for the District of Columbia.

Easterday traveled from Kentucky to the nation’s capital because he was upset with the results of the 2020 presidential election and then joined the mob to storm the Capitol building, per the release. He was among the group of rioters outside the East Rotunda doors of the Capitol building.

While a U.S. Capitol Police officer was dealing with one rioter, the office said Easterday pepper sprayed that officer in the face and prompted him to collapse and lose consciousness a few minutes later. When that officer regained consciousness, he still suffered from vision problems for hours after the incident, prosecutors said.

Easterday was later handed a second can of pepper spray by a fellow rioter and used it to spray another small group of officers. At least one of the officers was hit in the face and was temporarily incapacitated, the office said in its press release.

He was arrested on Dec. 8, 2022, in Miami.

Chief Judge James Boasberg said during the sentencing hearing that he gave a lower sentence than what prosecutors recommended due to Easterday’s young age, The Associated Press reported. He added that the man, who was homeschooled while living on a family farm, “may not have fully appreciated what was going on there” during the Jan. 6, 2021, attack on the Capitol.

Easterday apologized to the officers who were injured and said he is “deeply ashamed” of himself for his actions, according to the AP.

More than 1,300 individuals have been charged in nearly all 50 states for actions related to the Jan. 6 insurrection. This includes nearly 500 who were charged with assaulting or impeding law enforcement, which is a felony, per the release.

The Associated Press contributed.