More than two years after the mass arrest of protesters at President Trump’s inauguration, two federal prosecutors walked into a D.C. courtroom earlier this month in a little-noticed hearing and told a judge that their investigation had ended and they would no longer pursue any of the cases.

The cases began with one of the most sweeping arrest actions ever in the nation’s capital. Authorities said rioters caused about $100,000 in property damage across 16 blocks downtown. The government said the group used “black bloc” tactics, dressing in dark colors and wearing masks, scarves or goggles to blend in with similarly dressed demonstrators who used rocks and crowbars to shatter windows of businesses and vehicles.

In all, 234 people were arrested and charged in the Inauguration Day rioting. Of them, 21 defendants pleaded guilty before trial — the only convictions arising from the arrests. A handful of defendants went to trial, which resulted in acquittals or hung juries. Other cases were dropped gradually.

Defense attorneys argued from the start that prosectors were overreaching. They said their clients were lawfully protesting and being blamed for the actions of a small group of vandals.

The U.S. attorney’s office put one of its most aggressive prosecutors in charge, a veteran who typically handled homicide cases.

But the challenges for the prosecution soon became clear as the defendants were split into groups of six for trial. In two trials, juries agreed with the defense attorneys and the government was unable to secure convictions. Jurors would later say they found that the defendants had participated in the protests but no evidence that those defendants were involved in the vandalism.

Within months, the cases unraveled further and federal prosecutors began dismissing them. By last summer, charges against the remaining defendants were dropped.

But defense attorneys continued to push to have the U.S. attorney’s office go further and dismiss the cases with prejudice, a legal distinction that means the government would not be able to refile charges against their clients.

During a March 15 hearing in front of Judge Robert E. Morin, the chief judge of D.C. Superior Court, Assistant U.S. Attorney David Goodhand, who was investigating the cases, took that step. Goodhand asked that the 188 cases not yet adjudicated be dismissed with prejudice.

Morin agreed. The judge also asked Goodhand’s office to review the cases to see which defendants might qualify to have their arrest records sealed.

Goodhand said in court that his office came to the decision to seek dismissals with prejudice because prosecutors had no intention of renewing the case, citing the vast amount of resources needed, especially after those that did go to trial did not result in guilty verdicts.

But Goodhand also informed the judge about details revealed during an internal investigation by the U.S. attorney’s office. Goodhand said the lead prosecutor in the case, Jennifer Kerkhoff, had misrepresented information about one of the defendants.

According to a transcript of the March 15 proceeding, during various court hearings in 2017 and 2018, Kerkhoff had repeatedly denied that she or the lead D.C. police detective on the case, Gregg Pemberton, had told a grand jury that a defendant named Cassandra Beale was present at one of the inauguration protest planning meetings.

Goodhand told Morin his office discovered that not only had that information indeed been presented to a grand jury, it was also incorrect. Beale, as her attorney had long asserted, did not attend any planning meetings.

“The government is still investigating the circumstances surrounding this discrepancy, but wanted to apprise the court of it as expeditiously as possible,” Goodhand told Morin.

Morin then instructed Goodhand that once his office had completed its internal inquiry, the judge should be told of its findings “because it may inform other actions.”

Kerkhoff was not present at the March hearing. Two individuals inside the U.S. attorney’s office said she has accepted a job with the Court Services and Offender Supervision Agency, a government office that oversees individuals in the District who are released from jail and under court supervision. Cedric Hendricks, a spokesman for the agency, declined to comment on “personnel matters.”

It wasn’t the first time the rioting cases were scrutinized because of Kerkhoff’s actions. Two judges last year separately ruled that Kerkhoff had withheld key evidence from defense attorneys.

When reached by phone, Kerkhoff referred inquiries to the U.S. attorney’s office, which declined to comment on the internal investigation.

But a prosecutor within Kerkhoff’s office, who declined to speak publicly because the internal investigation was ongoing, said Kerkhoff was one of the office’s top prosecutors who cared passionately about — and fought vigorously for — victims. But the hundreds of cases, the prosecutor said, became overwhelming. At the same time, Kerkhoff also was promoted to a supervisory position overseeing violent-crime cases within the office.

“I don’t believe she intentionally lied about anything. I just think it became too much for one person to oversee,” the prosecutor said.

As the protest cases moved through the legal system, Kerkhoff and her colleagues were criticized for using undercover video supplied to the government by Project Veritas, a conservative activist group that uses secret recordings to target the mainstream news media and left-leaning groups.

The prosecution used several videos from the group, which secretly attended planning meetings before the inauguration protest. But two judges determined that Kerkhoff failed to either supply all of the Veritas videos to defense attorneys before trial or edited the videos and failed to disclose all of the edits to attorneys.

Defense attorneys said the March 15 hearing verifies what they have argued since their clients were grouped together and arrested.

“It was an out-of-control prosecution,” said Roy L. Austin, an attorney for Beale who led the move for dismissals at the recent hearing.

A spokesman for Jessie K. Liu, the U.S. attorney for the District, declined to comment on the handling of the protest cases, which were brought under her predecessor. Liu is now under consideration by President Trump to become the Justice Department’s No. 3 official.

Austin noted the time spent on the case by defense attorneys, many of whom, like himself, were working pro bono or court appointed, as well as prosecution staff and judges. He said that effort could have been better directed to other cases.

“This was an in­cred­ibly reckless prosecution, completely unnecessary from the get-go, that was only aimed at chilling people’s free speech,” said Austin, a former prosecutor in the U.S. attorney’s office.

Beale, 26 and at the center of the hearing this month, expressed relief at the outcome but said the two years have taken a toll. The community college student in Pasadena, Calif., cited the financial hardship of flying to Washington for court hearings. She also said her doctor diagnosed her with an anxiety disorder, which she said was caused by her arrest and prosecution.

“It’s been unbelievable just how big these charges were. It’s hard to get my mind around,” Beale said. “But after it went on for so long, it became something we always thought about. It’s really great news, but just hard to believe this stuff even happened to begin with.”