LOS ANGELES (AP) - 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.

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, Khloe Kardashian and Kylie Jenner - had defamed her as violent and unstable, and persuaded producers and executives to cancel her reality show, “Rob & Chyna.”

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.

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.

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.

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.