A testy courtroom exchange between rapper Cardi B and the lawyer suing her for copyright infringement became so contentious that the judge threatened a mistrial.

U.S. District Judge Cormac Carney sent jurors out of his Santa Ana, Calif. courtroom Wednesday, announced he was considering a mistrial and said the lawyer's cross-examination of the rapper "totally crossed the line."

He said the bickering wasn't "productive. It's unprofessional."

Cardi B Exits Santa Ana Court
Cardi B exits federal court as proceedings continue in a $5 million copyright infringement lawsuit against her in federal court, Wednesday, Oct. 19, 2022, in Santa Ana, Calif. Kevin Michael Brophy is suing the musician for allegedly misusing his likeness for her sexually suggestive mixtape cover art in 2016. Chris Pizzello/AP Photo

The lawyer, A. Barry Cappello, represents Kevin Michael Brophy, who claims his back tattoo was misused when it was unwittingly photoshopped on the cover of the rapper's 2016 mixtape. The cover shows a tattooed man from behind with his head between the rapper's legs.

Brophy testified on Tuesday that the racy photo has humiliated him for years and could upset his young children.

On Wednesday, the trial became contentious when Cardi B took the witness stand and battled with Cappello. The rapper claimed Brophy was harassing her for money and suffered no consequences because of the photo. Brophy is seeking $5 million.

The judge twice sent jurors out of the courtroom to admonish Cappello and the rapper for their heated exchanges.

"I feel like I'm being taken advantage of," she testified. "I missed my child's first steps by being here."

An artist photoshopped Brophy's tattoo on to an image of a black model. Brophy is white.

Under questioning from her attorney Lisa F. Moore, Cardi told jurors she never owned the mix tape or created the modified tattoo. She said Brophy is seeking damages that were more than what she made from the mix tape, which was just over $225,000 "after paying taxes and [expletive]."