A New York appellate court ruled Thursday that President Trump must face a defamation lawsuit filed by former “Apprentice” contestant Summer Zervos, one of about a dozen women who accused Trump of sexual misconduct shortly before the 2016 election.

The ruling, which Trump’s lawyers plan to appeal, means that attorneys for Zervos may have the opportunity to question Trump under oath in the coming months. The current schedule sets a deadline of June 28 for depositions, with document and electronic discovery expected to be concluded by the end of July.

Trump called Zervos and the other women who made accusations against him “liars,” prompt­ing Zervos to file the lawsuit in 2017.

Trump’s attorneys have tried unsuccessfully to block the suit, arguing that the president is immune from such lawsuits in state court.

In its ruling Thursday, a panel of New York appellate judges rejected that argument, citing the U.S. Supreme Court’s ruling in Clinton v. Jones, which established that presidents can be sued for unofficial acts while in office. Two of the five judges on the panel dissented in part.

“Contrary to defendant’s contention, Clinton v Jones did not suggest that its reasoning would not apply to state court actions,” the majority decision said. “It merely identified a potential constitutional concern. Notwithstanding that concern, this Court should not be deterred from holding that a state court can exercise jurisdiction over the President as a defendant in a civil lawsuit.”

Zervos’s legal team hailed the ruling as an affirmation that Trump “is not above the law.”

“The case has proceeded in the trial court, and discovery continues,” Mariann Wang, Zervos’s attorney, said in a statement. “We look forward to proving to a jury that Ms. Zervos told the truth about Defendant’s unwanted sexual groping and holding him accountable for his malicious lies.”

Trump’s attorney, Marc E. Kasowitz, said the president plans to appeal to the New York Court of Appeals, “which we expect will agree with the dissent.”

“We believe that the well-reasoned dissenting opinion by 2 of the 5 justices, citing the U.S. Supreme Court decision in the Clinton v. Jones case, is correct in concluding that the Supremacy Clause of the U.S. Constitution bars state courts from hearing cases against the President while he or she is in office,” Kasowitz said in a statement.

Zervos has claimed that Trump forcibly kissed and groped her during a December 2007 encounter at the Beverly Hills Hotel in Los Angeles. Trump has denied the allegations.

The ruling in Zervos’s case could also hurt the president’s cause in a separate New York lawsuit — this one involving his troubled charity, the Donald J. Trump Foundation.

The New York attorney general sued Trump last year, alleging “persistently illegal conduct” at the charity he has run for 31 years. Among other allegations, the attorney general said Trump had used his charity’s money to pay legal settlements for his for-profit businesses, to buy expensive portraits of himself, and to serve as an extension of his political campaign in 2016, making donations arranged by campaign staff.

Many of the allegations about misconduct at the Trump Foundation were first reported by The Washington Post in 2016.

That suit is also filed in New York state court, and Trump’s attorneys had argued that his status as president should exempt him from state suits. In a recent ruling, the judge in the Trump Foundation case said that if the Zervos ruling were to go in Trump’s favor, she would also dismiss the charity lawsuit.

Now, the foundation case seems likely to proceed.

Neither New York Attorney General Letitia James (D) nor a Trump Foundation attorney immediately responded Thursday to requests for comment.

James entered a new legal filing Thursday with what she said were “undisputed” facts about the Trump Foundation. Among them: James said that the foundation’s board, which was legally required to oversee the charity’s spending, had not met since 1999.

“The Foundation is little more than an empty shell that functions with no oversight by a board of directors,” James said in the filing.

The lawsuit — first filed under James’s predecessor, Barbara Underwood — asks for Trump to pay millions in penalties and restitution and to be barred from serving on the board of any New York charity for 10 years. It seeks shorter-term bans on charity service for Trump’s children Eric, Ivanka and Donald Jr., who were all members of the foundation’s board.

Trump has agreed to shutter the foundation and give away its remaining $1 million in assets to other charities, but the details of that settlement have not been announced.

The Zervos case is not the only defamation lawsuit Trump has faced as president.

Adult-film actress Stormy Daniels had filed a separate suit against Trump, arguing that he defamed her when he suggested that she had lied about being threatened to keep quiet about their alleged past relationship. That lawsuit was dismissed by a federal judge in October.