Some protests on Inauguration Day turned vioent near 13th and K Streets NW . (Sarah L. Voisin/The Washington Post)

Federal prosecutors agreed Wednesday to drop charges against an American University student accused of aiming a laser pointer at a U.S. Park Police helicopter on Inauguration Day if he completes a one-year term of good conduct including 100 hours of community service.

The felony case against George Herdeg, 21, an international-studies major from San Antonio, could be dismissed in as soon as six months if he completes his community service under a deferred-prosecution agreement reached by Assistant U.S. Attorney Erik M. Kenerson of the District and Herdeg’s lawyer, prominent white-collar defense attorney Abbe D. Lowell.

The signed deal was submitted to U.S. Magistrate Judge Robin M. Meriweather. A spokeswoman for U.S. Attorney Channing D. Phillips declined further comment, but a five-page agreement released by the office stated that Herdeg had agreed to court supervision, to remain a full-time student or regularly employed and to commit no crimes or associate with convicted felons.

Herdeg and Lowell declined to comment after a brief hearing Wednesday afternoon.

In court filings, prosecutors said that when Herdeg was charged in January, he denied to police intentionally aiming a laser pointer in his possession at an aircraft. Federal law requires proof of a defendant’s intent to find guilt.

In the prosecution agreement, Herdeg acknowledged that he “knowingly aimed the laser beam into the police helicopter’s flight path, but it was not his intent to have the beam make contact with the helicopter.” However, the agreement states, the beam in fact “struck the helicopter itself.”

Prosecutors disclosed Herdeg’s arrest at the same time they announced charging more than 200 demonstrators with felony rioting after damage was done to storefronts and a limousine was set on fire in a four-block area near 13th and K streets NW the afternoon of President Trump’s inauguration. Sixteen of those cases have been dismissed, including those brought against some journalists swept up while covering protests, and 214 people have been charged with offenses under District law.

Family members at court previously said Herdeg was not a protester.

Herdeg was charged under a federal law that carries a maximum penalty of five years in prison. He had been ordered not to possess a laser pointer and was released on his own recognizance pending the hearing Wednesday.

According to charging documents, personnel aboard Eagle 3, a U.S. Park Police helicopter that was circling demonstrations near Franklin Square about 3:41 p.m. on Jan. 20, saw “transient green flash[es],” which they “understood as a laser pointer being pointed at the aircraft.”

Law enforcement officers canvassing on the ground a short time later saw a beam coming from a group of six men, including Herdeg, who was carrying the device, according to court filings. Herdeg was arrested and later admitted using the laser, Park Police detective Andrew Watson said in an affidavit to the court.

A Justice Department spokeswoman said that from 2013 to 2015, prosecutors filed 18 to 20 cases a year involving laser-pointer incidents with aircraft, although the number fell to 11 last year and one in the current fiscal year between Oct. 1. and Jan. 23.