An 18-year-old man accused of setting a fire outside a Portland Police Bureau precinct during a chaotic protest was sentenced Wednesday to three years probation and community service.

Rollin Tristan Fodor pleaded guilty to first-degree arson in connection with the June 26 blaze. His lawyer told Multnomah County, Ore., Circuit Judge Amy Baggio that her client attended several protests and got "caught up" in the event.

DOUGLAS MacKINNON: BLACK LIVES MATTER, ESPECIALLY THE LIVES OF CHILDREN LIKE ANISA SCOTT WHO ARE SENSELESSLY MURDERED

“I am sorry for my actions,” Fodor told Baggio during Wednesday's court hearing, according to The Oregonian.

Rollin Tristan Fodor

Rollin Tristan Fodor (Multnomah County, Ore., Sheriff's Office)

Authorities said he tossed a rubber trash can into a dumpster fire on the north side of the bureau’s North Precinct. The precinct wasn't damaged. Officers used tear gas to disperse demonstrators near the blaze so firefighters could extinguish it.

Gavoughn Streeter-Hellerich, 22, is accused of setting the fire. He faces first-degree arson and riot charges. Fodor, who was 17 when the event occurred, does not know Streeter-Hellerich, the newspaper reported.

CLICK HERE TO GET THE FOX NEWS APP

Fodor will receive credit for time served, but faces a probation violation in connection with a 2019 conviction for third-degree robbery, according to the news outlet. He will be required to complete 160 hours of community service and pay restitution for damage resulting from the fire.

Similar acts have occurred during weeks of violent protests in Portland's downtown. Among the reported crimes from the nightly demonstrations are arson, shootings, assault between protesters and authorities and vandalism to businesses and public property.