R&B hitmaker R. Kelly’s forced his girlfriends to write fake blackmail letters that he could use to defend himself in case he got charged with sexually abusing them, one of his accusers testified on Wednesday at his New York City trial.

The witness, testifying as a "Jane Doe" in federal court in Brooklyn, read for the jury parts of one letter in which she told Kelly that if he tried to break up with her, "I’m going to tell everyone you raped me. … I’m going to say you raped me since I was a minor."

Her notes to him also warned that "she would spank herself really hard" — hard enough to leave bruises — so she could accuse him of beating her.

After the defense confronted the witness with the letters, she insisted the abuse was real and that the writings were a ploy engineered by Kelly "to protect him in a trial like this from very serious charges."

R. KELLY ALLEGEDLY BARRED GIRLFRIENDS FROM WATCHING ‘SURVIVING R. KELLY,' CONTROLLED THEM DURING CBS INTERVIEW

R. Kelly reportedly forced his girlfriends to write fake blackmail letters in case the R&B singer was ever accused of sexually assaulting them.

R. Kelly reportedly forced his girlfriends to write fake blackmail letters in case the R&B singer was ever accused of sexually assaulting them. (E. Jason Wambsgans/Chicago Tribune via AP, Pool)

The woman, now 23, had previously detailed how she was groomed and exploited by Kelly starting in 2015 when she was a 17-year-old aspiring singer. The defense sought to discredit her with the letters and other evidence it claims showed her parents were behind a scheme to take advantage of Kelly's fame.

Assistant U.S. Attorney Elizabeth Geddes responded by giving a point-by-point rundown of her testimony — including allegations that he intentionally isolated and demeaned her with perverted "punishments." She then asked the witness whether the blame fell "on your parents or the defendant?"

She responded: "The defendant."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Kelly, 54, has repeatedly denied accusations that he preyed on several alleged victims during a 30-year career highlighted by his 1996 mega hit "I Believe I Can Fly." His lawyers have portrayed his accusers as groupies who are lying about their relationships with him.

The government also called a former member of Kelly's entourage to the witness stand on Wednesday who said he helped recruit a pastor to perform a secret marriage ceremony for Kelly and singer Aaliyah.

Last week, a former tour manager for the R&B legend testified that he paid a $500 bribe to a government worker to get Aaliyah a fake identification used to pave the way for Kelly to marry the singer after he began a sexual relationship with her and believed she had become pregnant. A marriage license that was put into evidence falsely listed her age as 18; she was 15. Kelly was 27 at the time.

Prosecutors say Kelly wanted to use the marriage, which was later annulled, to shield himself from criminal charges related to having sex with a minor and to prevent her from testifying against him.

CLICK HERE TO GET THE FOX NEWS APP

Aaliyah, whose full name was Aaliyah Dana Haughton, worked with Kelly, who wrote and produced her 1994 debut album, "Age Ain’t Nothing But A Number." She died in a plane crash in 2001 at age 22.