The news that Justice Department lawyers are taking over the defense of President Donald Trump against a lawsuit by E. Jean Carroll, who says Trump raped her in the 1980s, is even worse than it sounds.

On the face of it, it's outrageous that government lawyers should expend taxpayer dollars to defend Trump against charges that he defamed Carroll by saying he had never met her and that she is a liar.

But underneath, in the legal nitty-gritty, the harm is greater still. The Justice Department isn't just defending Trump. It's poised to argue that Carroll's suit should be treated under a federal law that protects government employees from being personally sued for acts taken within the scope of their official duties.

This is a gross misconstruction of federal law. Trump's denial that he ever met Carroll had literally nothing to do with his job as president. If a court were to find otherwise, it would effectively insulate presidents from a range of private lawsuits, undercutting the Supreme Court precedent that says the president may be sued civilly because he isn't above the law.

To understand why what's going on here is so bad, you have to start with Carroll's lawsuit. It doesn't seek damages arising from the rape that she alleges, which she says happened long before Trump was president. There would be no conceivable way for the government to allege that Trump was acting in an official capacity then.

Rather, Carroll's core claim is that Trump falsely and maliciously smeared her when, on several occasions, he denied knowing her and said she was lying for personal gain, "to get publicity ... or sell a book."

Carroll is represented by a brilliant and effective cause lawyer, Roberta Kaplan, who gained national attention for representing Edith Windsor in her successful challenge to the Defense of Marriage Act. Kaplan's legal briefs in Carroll's case made sure to specify that Trump was being sued only in his personal capacity, not for any conduct he might have committed as president.

Kaplan's briefs also point out that Trump, while president, has brought several high-profile lawsuits in his personal capacity, including his suit against the New York district attorney's office, Trump v. Vance, which the Supreme Court decided against Trump this past July.

Under the precedent of Clinton v. Jones, a president can be sued while in office for personal actions taken. That 1997 Supreme Court decision was reaffirmed in Trump v. Vance, which relied heavily on its logic that the president is not above the law.

To represent Trump in Carroll's lawsuit, the Justice Department has to assert that Trump was acting in his official capacity when he denied knowing Carroll and called her a liar. In a brief legal document filed yesterday, the department said that Attorney General William Barr (acting through a deputy) had officially certified Trump's conduct occurred while the president "was acting within the scope of his employment." Under the Federal Tort Claims Act, this certification by the attorney general is all that is required for the case to be removed from state court and put in federal court.

But Barr's certification is preposterous and indefensible. Carroll's allegations had nothing to do with Trump's exercise of his office. His denial therefore also could not have been made in his official capacity as president.

If the only purpose of the Justice Department action were to substitute government lawyers for Trump's private lawyers, that would be bad enough. The government should not be defending the president against a charge of smearing a woman who accused him of rape.

Yet the true importance of Barr's decision is far worse. Under the same federal law, a suit against a government employee for acting in an official capacity is not only defended by the government — it is transformed into a suit against the government. The government, not the official, becomes the defendant. And, crucially, any damages are paid by the government.

Put simply, the Justice Department strategy is to completely remove Trump from this lawsuit, making it a run-of-the-mill civil case against the government that is entirely depersonalized. Instead of Carroll suing and confronting the man who she says raped her, she would be suing the faceless government for the official wrongdoing of one of its employees.

It seems altogether possible that this attempt by the Department of Justice will fail. A provision of the Federal Tort Claims Act unmentioned in the government filing specifies that removal to federal court can't apply to "any claim arising out of ... libel." Depending on how that provision is interpreted, it could be that the entire removal to federal court is legally inappropriate. That is certainly how the statute reads on its face.

Regardless, attempting to protect the president by claiming that he was acting in his official capacity when he made the denial is a blatant effort to protect Trump, and in theory other presidents, from being held liable for their private actions. It sends a message that Trump has tried to send many times before: that he is above the law. That flies in the face of Supreme Court precedent — and common sense in a democracy.

Noah Feldman is a Bloomberg Opinion columnist and host of the podcast "Deep Background." He is a professor of law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter.