(Bloomberg) -- Former President Donald Trump was motivated “purely by personal vendetta” in 2019 when he publicly accused New York author E. Jean Carroll of fabricating an explosive claim that he raped her in the 1990s, Washington DC’s attorney general told an appeals court.

A defamation suit Carroll filed against Trump for attacking her motives, character and appearance hinges on whether his remarks fell within the scope of his job as president. DC Attorney General Karl Racine, who isn’t involved in the case, on Friday threw his weight behind Carroll, arguing in a friend-of-the-court brief that Trump’s comments weren’t an official duty.

Trump “was acting to demean and tarnish the reputation of a woman who alleged he had assaulted her in his previous capacity as a private citizen, and was in no way acting to further the interests of the United States when he made the comments at issue in this case,” Racine said in a statement.

Finding otherwise, the Democrat argued, would upend decades of precedent in the city’s employment law and expose employers to more liability for their workers’ personal conduct.

If Carroll prevails in the district’s highest local court, where oral arguments are set for next month, her underlying suit against Trump will be allowed to proceed in federal court in Manhattan. A trial is tentatively set for April.

“Perhaps more than any other individual, a sitting President must be able to defend himself against false and heinous accusations in the public sphere,” Trump’s lawyer, Alina Habba, said in a statement.

Trump has vigorously denied attacking or defaming Carroll.

Read More: Trump Accuser Urges Court to Reject Immunity in Defamation Case

Under Washington law, employees “act within the scope of employment only when they act with a purpose to serve their employer,” according to Racine. “When an employee acts out of purely personal motives, his conduct remains outside the scope of employment and his employer is not directly liable for it.”

Washington’s employment law governs whether Trump acted within the scope of his employment when he made the statements, and therefore whether the case can move forward. Trump previously won on a related argument, when the federal appeals court in Manhattan ruled that he qualified as a government employee under a law protecting federal workers from most civil lawsuits.

(Updates with comment from Trump’s lawyer.)

©2022 Bloomberg L.P.