Quincy Jones, the legendary producer of Michael Jackson’s “Thriller” album, is expected to take the stand on Thursday to press his case that the late singer’s estate has cheated him out of $30 million.

In the expected dramatic showdown, Jones, a mentor to the late King of Pop, will claim Jacko’s estate and Sony Music remixed certain hit songs, including “Beat It,” to sidestep obligations to pay him royalties.

At issue are royalties and licensing fees from releases after Jackson’s death in June 2009 — an event that sent interest in Jacko’ s catalog sky-high.

Judge Michael L. Stern has said the case will turn on basic contract law — the sort “you learn in the first six months of law school.”

But the historic tightness of the Jackson-Jones relationship has made the trial extremely emotional for fans of the artist and the producer alike.

On being asked by NPR in 2009 about his “symbiotic relationship” with Jackson, who had died weeks earlier, Jones responded: “Yeah. Ours is as close as it gets.”

Jackson’s mentor also admitted he “freaked out” on learning about the death of his princely protégé.

“It was heavy,” he told The Hollywood Reporter in 2015, “because, boy, the relationship with a producer and an artist is really special. And there’s no room for B.S. at all. It’s got to be pure.”

Jones, who has earned a record 79 Grammy Award nominations in his 84 years, waited until 2013 to bring his suit against Jacko’s estate, MJJ Productions, and Sony Music Entertainment, the artist’s record label.

Last year, after denying the estate’s motion for a summary judgment, Stern ordered a trial.

Jurors, now in their second week of duty, have already heard from Jones’ lawyers that the producer received only $455,000 for the film “This Is It,” which documented Jackson’s preparation for the London shows later canceled because of the pop star’s shocking death.

The Jackson estate, meanwhile, allegedly took in $90 million from what became the highest-grossing concert film of all time — with worldwide receipts of $500 million.

Jones’ lawyers have also claimed the documentary could not have been made without recordings engineered by the producer, whom many music experts consider the brains behind Jacko’s success.

They further allege that master recordings of Jones-produced hits by the singer, including the 25th anniversary edition of “Bad,” were remixed to deprive the producer of royalties.

Even the remixing violated the contractual rights of Jones “that he be given the first opportunity to re-edit and/or remix any of the masters,” the suit claims.

A lawyer for Jackson’s estate countered at the trial’s opening that Jones “is not entitled to anything but a fraction of the money he’s after.”

A Sony executive testified on July 18 that Jones had received $18 million in royalties between 2009 and 2016 for his earlier work with Jackson.

Although Stern originally estimated the trial could take three weeks, Billboard reported that he has since informed the jury it could wrap up on Friday.