During the presidential campaign, Joseph R. Biden Jr., then the Democratic candidate, slammed his opponent, Donald J. Trump, for a highly unusual legal move: bringing in the Justice Department to represent him in a defamation lawsuit stemming from a decades-old rape allegation.
At one of their debates, Mr. Biden accused Mr. Trump of treating the Justice Department like his “own law firm” in the suit, filed against him by the writer E. Jean Carroll. “What’s that all about?” he sarcastically asked.
But on Monday night, nearly eight months after Mr. Biden’s attack, his own Justice Department essentially adopted Mr. Trump’s position, arguing that he could not be sued for defamation because he had made the supposedly offending statements as part of his official duties as president.
In a brief filed with a federal appeals court in New York, the Justice Department acknowledged that Mr. Trump’s remarks about Ms. Carroll were “crude and disrespectful,” but the department also claimed that the Trump administration’s arguments were correct — a position that could lead to Ms. Carroll’s lawsuit being dismissed.
Mr. Biden has repeatedly said he wants to restore the Justice Department’s traditional independence from the White House — a stance that has been echoed by several of his top picks for the department’s leadership. Early Tuesday morning, a spokesman said in an emailed statement that the White House “was not consulted by D.O.J. on the decision to file this brief or its contents.”
The White House declined to comment on the lawsuit. But the spokesman, Andrew Bates, added that “President Biden and his team have utterly different standards from their predecessors for what qualify as acceptable statements.”
Even so, the late-night filing caught many, including Ms. Carroll’s lawyers, by surprise and marked another twist in a protracted legal battle.
That dispute began in November 2019 when Ms. Carroll, a longtime columnist for Elle magazine, sued Mr. Trump, claiming he had lied by publicly denying he had ever met her, after she had accused him of rape months earlier. In a book excerpt published in New York magazine that June, Ms. Carroll wrote that Mr. Trump had thrown her up against the wall of a dressing room at Bergdorf Goodman, an upscale department store in Manhattan, in late 1995 or early 1996. Then, she claimed, Mr. Trump pulled down her tights, opened his pants and forced himself on her.
Shortly after the excerpt was published, Mr. Trump said in an Oval Office interview that the assault had never happened and that he could not have raped Ms. Carroll because she was not his “type.” According to the lawsuit, Mr. Trump also issued an official statement accusing Ms. Carroll of lying about the alleged assault.
For several months, the defamation suit wound its way through a state court in New York. But then last September, one month after a state judge issued a ruling that potentially opened the door to Mr. Trump sitting for a deposition before the election, the attorney general, William P. Barr, stepped into the case. In a highly unusual move, Mr. Barr transferred the case to federal court and substituted the federal government for Mr. Trump as the defendant.
Federal law forbids government employees from being sued for defamation, meaning that if the move was successful, Ms. Carroll’s claim would be dismissed.
Mr. Barr’s move raised the question of whether Mr. Trump had in fact made his comments about Ms. Carroll as a government employee — a position that Ms. Carroll’s lawyers roundly rejected. “There is not a single person in the United States — not the president and not anyone else — whose job description includes slandering women they sexually assaulted,” the lawyers said in a filing last year.
In October, the first federal judge to consider the case, Lewis A. Kaplan of Federal District Court in Manhattan, agreed with Ms. Carroll, blocking Mr. Barr’s move and deciding that the suit could continue against Mr. Trump in his private capacity. Mr. Trump’s comments concerned events that had occurred “several decades before he took office,” Judge Kaplan ruled, and had “no relationship to the official business of the United States.”
Before Mr. Trump left office, the Justice Department appealed Judge Kaplan’s ruling, and many legal observers predicted that a new attorney general, under Mr. Biden, would drop the Trump-era claims.
The brief filed on Monday night was the first time the Biden administration’s Justice Department, now led by Attorney General Merrick B. Garland, weighed in on the issue. In the brief, department lawyers said that when Mr. Trump had denied raping Ms. Carroll, through the White House press office or in statements to reporters in the Oval Office and on the White House lawn, he was acting within the scope of his office.
“Elected public officials can — and often must — address allegations regarding personal wrongdoing that inspire doubt about their suitability for office,” the department lawyers argued, adding, “Officials do not step outside the bounds of their office simply because they are addressing questions regarding allegations about their personal lives.”
Ms. Carroll’s lead lawyer, Roberta A. Kaplan, reacting to the new filing, said that as “horrific” as the alleged rape was, it was “truly shocking that the current Department of Justice would allow Donald Trump to get away with lying about it.”
Ms. Carroll, in her own statement, said she was angry and offended.
“As women across the country are standing up and holding men accountable for assault,” she said, “the D.O.J. is trying to stop me from having that same right.”