A Maryland college student and marijuana activist pleaded guilty Friday to a charge of illegally wiretapping a congressional staffer after live-streaming a meeting last fall at a local office of Rep. Andy Harris without the person’s consent.

Maryland State Prosecutor Emmet C. Davitt announced that his office reached an agreement with Jake Burdett, 21, a Salisbury University student who pleaded to one count of illegally recording the staffer. The pre-indictment plea agreement stipulated that Burdett would receive probation before any judgment and complete 100 hours of community service, prosecutors said in a statement.

The charges against Burdett stem from an October protest he participated in as an advocate for Maryland Marijuana Justice, according to prosecutors. Burdett and others had gathered to protest the Republican congressman’s stance against medical marijuana.

During the protest, a staffer for Harris offered to meet with a group of demonstrators in the office, where Burdett recorded the entire meeting and streamed it on Facebook Live, prosecutors said.

Burdett and others from the group had rallied outside Harris’s office in Salisbury when a congressional staffer offered to meet with them inside, the state prosecutor previously said. The staffer told the group that recording was not allowed in the office, but Burdett recorded and live-streamed the meeting anyway, court documents state. Maryland law requires that all parties consent to being recorded.

Burdett did not know it was a felony or illegal to live-stream the interaction, according to a statement from Maryland Marijuana Justice. Burdett deleted the live stream a day after the meeting when he learned his recording was illegal, the group said.

Officials said County Administrative Judge S. James Sarbanes consented to the plea agreement.

“We need to ensure people are respecting the boundaries” set by the state wiretapping laws, Davitt said in a statement.

The case had been referred to state prosecutors by the Wicomico County state’s attorney’s office.