Exclusive

The 2 men who were featured in "Leaving Neverland" who accused Michael Jackson of molesting them as children have just won a huge legal victory ... because a California appeals court has just given them the right to sue for sexual abuse.

A trial judge threw out the cases of James Safechuck and Wade Robson, on grounds they waited too long to file their claim. When they filed their lawsuits, California law did not support their claim, because the statute of limitations required them to file before they turned 26. At the time they filed, Robson was 30 and Safechuck was 36.

But, a new law took effect on January 1, 2020, which allows sexual abuse victims to sue until they're 40. A California appeals court just ruled the new law allows both Robson and Safechuck to have their cases tried -- presumably before a jury.

It's a huge reversal of fortune. Up till now, the MJ companies have been able to fend off these claims based on the statute of limitations, but that's all changed as of New Year's Day.

Under the ruling, the 2 men can go to trial against MJJ Productions and MJJ Ventures ... and according to the law, they could win if they prove the allegations and show the people who ran the company knew or should have known they were in peril. As for the MJ Estate, there are different rules, and both Safechuck and Robson are barred by the statute of limitations.

Safechuck alleges Jackson abused him hundreds of times when he was a child ... kissing his genitals, rubbing and sucking Jackson's nipples as the singer masturbated and anally penetrated Safechuck with his finger.

As for Robson, he claims the abuse included fondling, kissing, giving and receiving oral sex and one incident in which MJ attempted to engage in anal sex with him.

The folks who manage Jackson's Estate have said all along the claims are bogus and filed by disgruntled former MJ fans who are barred by the statute of limitations. The Estate lawyer, Howard Weitzman, told TMZ in the past he's confident the claims will be dismissed.