President Trump must sit for seven hours of questioning in the defamation case filed by a former contestant on his reality TV show, a judge ruled Tuesday — but it’s unclear if he’ll get grilled about other women’s allegations of sexual assault and harassment.

Manhattan Supreme Court Justice Jennifer Schecter ordered that Trump be deposed by Jan. 31 and told lawyers on both sides to submit written arguments on whether Summer Zervos’ lawyer can ask him about the other accusers.

The issue could prove thorny for Trump, because the impeachment of former President Bill Clinton grew out of a deposition in which he falsely denied having sex with White House intern Monica Lewinksy.

Zervos lawyer Mariann Wang said in court that she wanted to question Trump about women “who have alleged that defendant subjected them to unwanted sexual touching or inappropriate conduct.”

Trump lawyer Marc Kasowitz countered that “to the extent that plaintiff seeks discovery from other women who are not parties to this case, who are not making a claim of defamation, we would take a position that that evidence would not be covered.”

The case against Trump stems from a news conference shortly before the 2016 election during which Zervos, who appeared on his show “The Apprentice,” accused the then-candidate of “aggressively” kissing, groping and rubbing his genitals against her in 2007.

Trump vigorously denied the allegations as “fiction” and said Zervos “wishes she could still be on reality TV,” prompting her to file suit three days before his inauguration.

The state Court of Appeals is currently weighing written arguments over whether the case should be stayed until Trump leaves office, and could issue a ruling as early as Thursday.

That decision is likely to wind up before the US Supreme Court.

Lawyer Joseph Cammarata, who represented Paula Jones in the case that bedeviled Clinton, said he expected Trump would be forced to answer questions about “the other women” because he threatened to sue them all.

“If he tells the truth it may be embarrassing, but it’s not going to have ramifications other than his own household and potentially politically,” he said.

Syracuse University law professor Roy Gutterman said he’s “not entirely sure whether allegations made by other women would have any bearing on [Zervos’] specific case” — but said Trump’s deposition still “could be embarrassing.”

“I would see some questions that are going to be pretty pointed about what happened….so there could be some very private matters that could end up making it into the public’s eyes and ears,” he said.