CNN  — 

The Justice Department said Monday that President Donald Trump had acted in his official capacity when denying a rape claim made by a longtime magazine columnist, and therefore shouldn’t be sued personally for defamation.

In a court filing, lawyers for the department told the court that “the President addressed matters relating to his fitness for office as part of an official White House response to press inquiries.”

“As stated in the complaint,” they wrote, “’(t)he rape of a woman is a violent crime,’ … and, if believed, even false allegations that the President committed such a crime could obviously impact the President’s ability to effectively govern.”

The department is seeking to intervene in the case and replace Trump as the defendant in a defamation lawsuit filed by the former columnist, E. Jean Carroll, who has accused him of raping her in a dressing room at a luxury Manhattan department store in the 1990s. Trump denied raping Carroll, telling reporters, “She’s not my type.” Trump also alleged Carroll lied about the rape to boost her book sales.

Should the department be allowed to intervene, it would likely spell the end of Carroll’s lawsuit, since the federal government can’t be sued for defamation. A federal judge is set to hear oral arguments in the case on Wednesday.

Lawyers for the department said when they initially sought to intervene that Trump had been acting in his official capacity when he denied sexually assaulting Carroll.

In their filing Monday, they asserted that the standard for determining whether the department should be allowed to intervene isn’t whether “as plaintiff argues, ‘slander’ or ‘defamation’ is part of a Federal elected official’s ‘job description.’ It is whether the official was acting within the scope of employment—e.g., making statements to the press while on duty responding to allegations of impropriety—when the alleged defamatory statement was made.”

Trump initially challenged Carroll’s case, but a state trial court judge ruled in August that the lawsuit could proceed, paving the way for Carroll’s attorneys to move forward in their efforts to obtain a DNA sample from Trump and take his deposition under oath. Soon thereafter, the Justice Department filed to replace Trump as the defendant.

Department lawyers said Monday that their involvement is appropriate because Trump’s retort to Carroll was required for him to continue doing his job, writing that “plaintiff’s allegations sought to call into question the President’s fitness for office and a response was necessary for the President to effectively govern.”

They added that “courts have repeatedly held that Federal elected officials who issue statements to the public on matters of concern or interest to constituents are acting within the scope of employment even where the comments relate to ‘personal’ or ‘private’ matters.”