Rob Kardashian settled a revenge porn lawsuit filed against him by his ex Blac Chyna.

According to multiple reports, the former couple reached an agreement before jury selection began on Monday (June 20). Prospective jurors were dismissed, dodging a trial that was expected to take place over a few days.

The last-minute settlement put an end to a lengthy legal battle. Blac Chyna originally sued Rob Kardashian in 2017, accusing him of posting naked photos of her on Instagram.

Terms of Rob Kardashian and Blac Chyna’s settlement weren’t revealed. The two sides struck a deal after a judge refused to enforce an alleged settlement proposed via email.

Last week, Rob Kardashian claimed his ex agreed to drop the revenge porn lawsuit if he took care of a separate civil case against them.

“The deal was, ‘If you can somehow do it, if you can somehow make the [other] case go away, we’ll dismiss this revenge porn case,” the Kardashian family’s lawyer Todd Eagan explained. “And we detrimentally relied on that. We took a lot of action, a lot of energy to make it happen. I have the executed dismissal of the [other] case.”

Blac Chyna’s lawyer Lynne Ciani denied accepting those terms. Ciani said her client previously pitched a monetary settlement, which Rob Kardashian rejected.