D.C. police detain two people on the day of President Trump’s inauguration in downtown Washington. (Clarence Williams/The Washington Post)

A 34-year-old activist admitted in court Tuesday to discussing a plot to disrupt an inaugural ball for Trump supporters with an acid attack inside the National Press Club in downtown Washington.

Scott R. Charney, of Northwest Washington, pleaded guilty in D.C. Superior Court to conspiracy to commit assault, a misdemeanor. In an agreement with prosecutors, the criminal record will be expunged if he performs 48 hours of community service.

The arrest of Charney hours ahead of the Jan. 19 DeploraBall attracted national attention, with police saying they had successfully foiled a dangerous plan to spread butyric acid through the press club’s ventilation system the night before Trump was inaugurated as president.

The crux of the police case was a conversation secretly recorded by associates of conservative activist James O’Keefe, who caught Charney and two others discussing the plot over beer at a pizza restaurant in December. O’Keefe’s operatives took the video to D.C. police and posted portions of it on the Internet.

Protest leaders maintained that Charney, who works at a local nonprofit group, and two others at the restaurant never considered carrying out an attack. They said the group knew it had been infiltrated and that the conversation was a ruse to distract from their real plans to identify the operative.

Charney’s attorney, Shan Wu, said his client “had not intended to injure anyone in any way.” He said his client did not have any acid and added, “I certainly think the plea offer with no criminal conviction or record correctly reflects the innocuous nature of this offense.” Wu said Charney “apologized to the court, to law enforcement and to any other who might have been alarmed by his statements.”

Bill Miller, a spokesman for the U.S. attorney’s office for the District, declined to comment beyond the plea agreement offered in court. Two other associates of Charney’s were also arrested in the same case; both pleaded guilty earlier and were also given 48 hours of community service.

Charney’s arrest was among the first by police trying to head off or confront protesters who tried to disrupt the presidential inauguration.

The day Trump was sworn in, a small group of protesters rampaged through a four-block area of downtown near Franklin Square, armed with hammers and crowbars, burning a limo and breaking windows of shops and cars. Rocks were thrown at riot-gear-clad police who countered with pepper spray and explosive “sting grenades.” Police arrested more than 230 people on charges of felony rioting. Prosecutors dropped charges against some, and a grand jury indicted 214 as authorities connected them to “black bloc” tactics of premeditated violence.

Charney’s plea agreement identifies him as a member of the D.C. Antifascist Coalition/DisruptJ20 Movement, an umbrella organization representing a variety of groups that came to the District to protest Trump.

In a statement released after his plea was entered in court, Charney called the charges political and said his arrest was more about “silencing dissent in Trump’s America.”

“I have apologized in court and taken responsibility for carelessly speaking in a way that alarmed others,” the statement says. “But the far greater causes for alarm are the real acts of violence being perpetrated against Asian Americans, Hispanic Americans, Muslim Americans, Jewish Americans, and others targeted by Trump’s policies.”

O’Keefe said in an interview last month that the discussion his operative captured on video was part of a real plot and that the arrests by police prevented groups from carrying out other even more disruptive attacks, such as chaining Metro cars to cripple the city’s transportation system.

On Tuesday, a spokesman for Project Veritas noted that evidence provided by the group was key to the prosecutions but said the group is “absolutely not” satisfied with the sentences.

The video shot by O’Keefe’s operative shows a detailed discussion of how to best create havoc at the DeploraBall. Charney and two others settled on butyric acid, which can damage skin and eyes. “This stuff is very efficient, it’s very smelly and lasts a long time,” Charney is heard saying. One of his associates added, “If you get it into the HVAC system, it will get into the whole building.”

The plea agreement signed by Charney said the defendants “engaged in a conversation about how they could conceal the acid into the event, suggesting water bottles, water guns, beer bottles, and other receptacles. They talked about how much the acid would cost to purchase and how much it would cost to get into the event. . . . Finally, they discussed dispersing the acid as eventgoers were exiting the National Press Club.”

Police also learned that one of the conspirators had purchased tickets to the ball.

The plea agreement states that the evidence indicates the defendants “did not want to hurt any person or eventgoer, but rather discussed only plans to disrupt the event.”