A New York appeals court on Wednesday tossed out the ruling in former Fox News host Bill O’Reilly’s $10 million lawsuit against his ex-wife’s attorney.

O’Reilly was suing Michael Klar, the attorney who once represented his ex-wife Maureen McPhilmy during the negotiation of a 2010 separation agreement, according to The Hollywood Reporter.

ADVERTISEMENT

Klar is accused in the lawsuit of tricking O’Reilly into entering the agreement although McPhilmy made false representations about her intent to comply with the agreement's terms.

The appeals court reversed a lower court's ruling that allowed the lawsuit to proceed while O'Reilly was visiting the White House, according to the outlet.

The court argued that the statute of limitations on fraud claims — greater than six years from date of injury or two years upon discovery — had passed.

“It is undisputed that the plaintiff commenced this action more than six years after the separation agreement was executed, and more than two years after the plaintiff discovered the alleged fraud,” the court ruling states. “In response, the plaintiff failed to raise a question of fact warranting the denial of the defendant's motion."

The 69-year-old former "O'Reilly Factor" host left Fox News in April 2017 amid allegations of sexual harassment. O'Reilly denies any wrongdoing.