A Massachusetts prosecutor dropped the sexual assault charges against actor Kevin Spacey Wednesday after the accuser declined to testify at a pre-trial hearing.

The charges stemmed from a complaint filed by a then-18-year-old busboy in 2017, accusing Spacey of groping him at a bar in Nantucket, Massachusetts, the year before. After intense questioning at a pre-trial hearing earlier this month, the accuser invoked his Fifth Amendment right against self-incrimination and refused to testify further.

Nantucket District Attorney Michael O’Keefe dismissed the charges of indecent assault and battery on Wednesday, citing the “unavailability of the complaining witness.” An attorney for the family—who dropped their civil suit against the actor earlier this month—said the accuser and his parents had shown “an enormous amount of courage under difficult circumstances.”

The Nantucket case is the first of more than a dozen allegations of sexual misconduct against Spacey to make it to trial, and one of the few high-profile accusations during the #MeToo movement to result in prosecution.

The allegations were first made public at a press conference in 2017 by the victim’s mother, former Boston news anchor Heather Unruh. The victim, who has asked not be named, claimed Spacey plied him with alcohol and stuck his hands down his pants after his shift at the Club Car bar and restaurant in 2016.

The accuser sent screenshots of text messages from the night in question to police, including several in which he appeared to ask his friends for help. “Help me,” the accuser wrote in one message to his then-girlfriend, and then, “He pulled my zipper down.”

Spacey's defense attorney, Alan Jackson, argued in court filings that the incident was a “consensual flirtation” that the accuser exaggerated to impress his friends. He honed in on the text messages in pre-trial hearings, first asking for the accuser’s cellphone and then—when it was not recovered—grilling the accuser and his mother over what he said were missing texts.

In a July 8 hearing, Jackson read aloud several texts he said police had recovered from the accuser’s cell phone. In one, the accuser's then-girlfriend wrote, “I can’t really tell if you’re kidding and I’m violently confused.” In another, she wrote, “Holy shit, slowly back away.” Neither messages appeared in the screenshots the accuser initially submitted to police.

Both the accuser and his mother denied deleting the texts, though Unruh admitted to removing evidence of her son's "frat boy activities" from the phone before turning it over to police. But when Jackson informed the accuser that tampering with evidence was a felony, the young man decided to invoke his Fifth Amendment right.

The district attorney’s office said Wednesday that they met with the accuser and told him the case could not proceed if he chose not to not testify.

“After a further period of selection privately with his lawyer, the complaining witness elected not to waive his right under the Fifth Amendment,” the office said.

The family dropped their suit against Spacey earlier this month, citing the “emotional rollercoaster” of the prosecution. No settlement was reached, according to Unruh.

Spacey was first accused of sexual assault by Broadway star Anthony Rapp, who claimed the actor made sexual advances on him decades ago, when Rapp was 14. At the time, Spacey said he did not remember the alleged incident but was “beyond horrified to hear his story.”

More than a dozen people went on to publicly accuse Spacey of sexual misconduct—including several employees of the Old Vic theater, where Spacey previously served as creative director. He was removed from the hit Netflix show House of Cards and was reportedly questioned by British police in May.

Late last year, after the charges were first announced, Spacey put out a bizarre YouTube video in which he assumed the character of Frank Underwood from House of Cards and seemed to protest his innocence.

“Oh sure, they may have tried to separate us, but what we have is too strong, it's too powerful and after all, we shared everything, you and I,” he said, addressing the viewer.

“So we're not done, no matter what anyone says,” he added. “And besides, I know what you want: You want me back.”