CNN  — 

A federal judge on Tuesday denied the Justice Department’s effort to effectively end a defamation lawsuit against President Donald Trump brought by a longtime magazine columnist who has alleged he raped her in a luxury department store dressing room, paving the way for the case to proceed.

The DOJ had sought to intervene in the case and substitute itself as defendant in the lawsuit filed by E. Jean Carroll, a move that likely would have curbed the proceedings, since the federal government can’t be sued for defamation.

Writing in her 2019 book, Carroll claimed Trump raped her in a dressing room at a luxury Manhattan department store in the 1990s.

Shortly after Carroll’s allegations became public, Trump denied them, telling reporters, “She’s not my type,” and accusing Carroll of lying to boost her book sales.

In a 61-page opinion, US District Judge Lewis Kaplan ruled that Trump “is not an ‘employee of the Government,’ as Congress defined that term,” and therefore the lawsuit isn’t, as the Justice Department argued, against the United States.

That conclusion allows for Trump to be sued personally for defamation in the matter. The Justice Department, which hasn’t indicated whether it will appeal the ruling, declined to comment.

The Carroll case is one of a litany of legal threats posed to Trump, many of which are likely to escalate if he loses the presidential election next week.

In his opinion, Kaplan also rejected the Justice Department’s argument that Trump’s statements regarding Carroll were made within the scope of his employment, writing, “while commenting on the operation of government is part of the regular business of the United States, commenting on sexual assault allegations unrelated to the operation of government is not.”

The department had argued in court filings that Trump acted in his official capacity when denying Carroll’s allegations, writing that “the President addressed matters relating to his fitness for office as part of an official White House response to press inquiries.”

Carroll’s lawyer, Roberta Kaplan, said Tuesday: “The simple truth is that President Trump defamed our client because she was brave enough to reveal that he had sexually assaulted her, and that brutal, personal attack cannot be attributed to the Office of the President.”

The case is now set to proceed in federal court. Carroll had originally filed her case in New York state court, and after Trump challenged it, a trial court judge ruled in August that the lawsuit could proceed, allowing Carroll’s attorneys to move forward in their efforts to obtain a DNA sample from Trump and take his deposition under oath.

Shortly thereafter, the Justice Department filed to replace Trump as the defendant.

On Tuesday, Carroll said she was gratified by the outcome. “When I spoke out about what Donald Trump did to me in a department store dressing room, I was speaking out against an individual,” she said. “When Donald Trump called me a liar and denied that he had ever met me, he was not speaking on behalf of the United States.”

This story has been updated with additional reaction and background information.

CNN’s Kara Scannell and Christina Carrega contributed to this report.