A federal judge on Tuesday rejected the Justice Department’s attempt to serve as President Donald Trump‘s defense in the defamation suit brought by New York writer E. Jean Carroll, who accused him of raping her over 20 years ago.

Since Trump’s recent denials of Carroll’s rape claim have no relation to Trump’s work as president, they do not necessitate a DOJ defense, U.S. District Court Judge Lewis Kaplan decided, in effect, allowing the case to proceed since federal officials acting in a business capacity are exempt from libel claims.

“In that event, Ms. Carroll would be left with no remedy, even if the president’s statements were false and defamatory,” Kaplan wrote in a 61-page opinion. “The undisputed facts demonstrate that President Trump was not acting in furtherance of any duties owed to any arguable employer when he made the statements at issue. His comments concerned an alleged sexual assault that took place several decades before he took office, and the allegations have no relationship to the official business of the United States.”

Trump has denied both the rape claims and ever knowing Carroll, despite a photo picturing the two of them together. Carroll has claimed that in the 1990s, Trump stopped her in the dressing rooms of Bergdorf Goodman, a luxury department store in Manhattan, saying, “Hey, you’re that advice lady!” She alleges he then held her against a wall and raped her.

“She is trying to sell a new book — that should indicate her motivation. It should be sold in the fiction section,” he said in one statement denying the event.

Carroll argued in a filing in a New York state court last November that Trump’s public denials constituted libel, as it damaged her reputation on false pretenses.

The DOJ argued that the president’s recent statements constituted a presidential act and thus attempted to step in as his defense, but Kaplan rejected the argument since Trump is not a standard “federal employee” and since his statements regarding Carroll were unrelated to his presidential duties.

“No one gives him permission to speak. No one can require him to say, or not to say, anything at all. No one has the authority to cut him off. And the statements he makes, as well as the topics he discusses, are entirely of his own choosing,” Kaplan wrote. “No one even arguably directed or controlled President Trump when he commented on the plaintiff’s accusation, which had nothing to do with the official business of government, that he raped her decades before he took office. And no one had the ability to control him.”