A man who alleges he was sexually assaulted by Kevin Spacey when he was 18 texted his girlfriend a string of messages detailing, in real time, how the star was groping and harassing him, according to a court filing made public Thursday.

“He’s grabbed my dick like 8 times,” the accuser wrote to his girlfriend between waiting tables at the Club Car bar on Nantucket, where he was working as a busboy.

The court papers have been reported by The Boston Globe, which said they were filed in March by Spacey’s lawyers as part of his defense against a felony charge of indecent assault and battery in the July 8, 2016 incident.

Spacey’s lawyers argue that the messages show that the accuser was going along with Spacey’s advances.

“There appear to be intervening time periods between each of these texts, yet [the accuser] continued to engage with Mr. Spacey,” Spacey’s lawyers say, adding the accuser, “never uses any language to indicate the interaction was unwelcome,” but instead stayed with Spacey, “welcoming his advances, because he wanted a ‘story’ to tell.”

A spokeswoman for Cape & Islands District Attorney Michael O’Keefe declined to comment, telling the Globe, “The case will be tried in the courtroom, not the media.”

Spacey faces a felony indecent assault and battery charge stemming from the July 2016 encounter at Nantucket’s Club Car bar.

The two-time Oscar winner allegedly bought the 18 year old drinks, then unzipped the man’s pants and fondled him.

Spacey has pleaded not guilty.

His lawyers have denied the allegations as “patently false,” describing the encounter as “mutual and consensual flirtation, nothing more.”

In the filing, Spacey’s lawyers say, “Both [the accuser] and [his then-girlfriend] appear to be amused by the story [the accuser] tells, and more importantly, [the accuser] never uses any language to indicate the interaction was unwelcome.”

However several texts appear to contain pleas for help, with one series reading:

“He’s buying me yet another drink”

“Help me”

“He’s gotten me so many”

“I’m drunk”

“Help”

The accuser has been ordered to turn over his cellphone to the actor’s legal team. However, the man claims to have lost the device.