A settlement agreement has been reached on the eve of a second trial pitting the Kardashian family against former reality TV star Blac Chyna.

Jury selection had been set to begin Monday in the trial over Chyna's allegations that her former fiance Rob Kardashian maliciously posted nude photos of her in 2017 after their tumultuous breakup, but according to court documents, the parties informed the judge that they had agreed to a settlement.

Emails to attorneys for both sides seeking comment and details on the terms of the settlement were not immediately returned.

A trial had seemed a virtual certainty after the judge last week denied a motion by Kardashian's attorneys to enforce a settlement agreement they said the two sides had reached.

KARDASHIAN FAMILY: A LOOK AT THE LAVISH WEDDINGS THAT BUILT A REALITY TV DYNASTY

The trial was to be a sequel of sorts to a defamation trial earlier this year in which Chyna, whose legal name is Angela White, alleged that Kardashian's mother and sisters — Kris Jenner, Kim Kardashian, Khloé Kardashian and Kylie Jenner — had defamed her as violent and unstable, and persuaded producers and executives to cancel her reality show, "Rob & Chyna."

Rob Kardashian Blac Chyna

Rob Kardashian and Blac Chyna in 2016. A settlement agreement has been reached on the eve of a second trial pitting the Kardashian family against former reality TV star Blac Chyna. (Photo by Gabe Ginsberg)

The Kardashians won a clear-cut victory in that trial May 2. The four women had attended most of the proceedings, and all four testified, though they were in New York at the Met Gala when the verdict was read.

Rob Kardashian, who has a daughter with Chyna, was not a defendant in that trial, but he gave often angry and sometimes sad testimony about the late-night fight that led to the end of their relationship.

KHLOE KARDASHIAN SHUTS DOWN ROMANCE RUMORS: ‘NOT SEEING' ANYONE

Chyna had initially filed one lawsuit against the whole family, but the judge ruled that the allegations against Rob — which also included assault accusations — should get their own trial. Fewer members of the famous family had been expected to attend the second trial, and only Rob and Kris Kardashian had been expected to testify.

Black Chyna

Blac Chyna arrives at the Oscars on Sunday, Feb. 9, 2020, at the Dolby Theatre in Los Angeles. Jury selection was set to begin Monday, June 21, 2022, in the trial over Chyna’s allegations that her former fiancé Rob Kardashian maliciously posted nude photos of her in 2017 after their tumultuous breakup.  (Photo by Richard Shotwell/Invision/AP, File)

At the first trial, jurors found that the Kardashians acted in bad faith in their conversations about the couple's troubles with producers of "Rob & Chyna" and executives from the E! network, which aired it. But they found that it had no substantial effect on Chyna’s contract or the fate of the show, and she was awarded no damages.

KIM KARDASHIAN IS ACCUSED OF DAMAGING MARILYN MONROE'S DRESS

Rob Kardashian

Rob Kardashian, from the show "Keeping Up With The Kardashians," attends an E! Network upfront event in New York on April 30, 2012.  (AP Photo/Evan Agostini, File)

Chyna’s attorney Lynne Ciani said after the verdict that she and her client were disappointed but felt vindicated by the jury's findings, which she said demonstrated that Chyna had not physically abused Rob, and validated their claim that the Kardashian women had attempted to interfere with her contract to be on the show.

CLICK HERE TO GET THE FOX NEWS APP