President Trump. (Evan Vucci/AP)

Harry Litman teaches constitutional law at the University of California at San Diego and practices law at the firm Constantine Cannon. He was U.S. attorney for the Western District of Pennsylvania from 1998 to 2001.

In his threats to revoke the security clearances of former government officials who have criticized his policies, President Trump has again shown his contempt for the rule of law. But this time he has chosen an area in which Supreme Court precedent shows his wrongheadedness.

In recent months, Trump or his surrogates have forcefully pushed the view that so long as he is exercising powers assigned to him by Article II of the Constitution, the president cannot act unconstitutionally. In particular, Trump and his champions claim that for a president (but nobody else under the law), motives do not matter. The only relevant inquiry is whether the conduct falls under an area of constitutional responsibility.

Trump’s legal team, for example, submitted a 20-page memorandum to special counsel Robert S. Mueller III arguing that since the president has the constitutional power to terminate the inquiry or pardon his way out of it, he cannot obstruct justice by exercising this authority “for any reason.”

Harvard Law professor Alan M. Dershowitz weighed in with a similar view, arguing: “You cannot question a president’s motives when the president acts. If a president pardons, that’s it. If a president fires, that’s it. You can’t go beyond an act and get into his motive or into his intent.”

Trump’s lawyer Rudolph W. Giuliani has claimed that the president, alone among U.S. citizens, cannot be subpoenaed or indicted while in office.

This royalist mind-set underlies Trump’s arrogation of the power to revoke the security clearances of former officials, and Trump critics, such as former CIA director John O. Brennan and former director of national intelligence James R. Clapper Jr. The basic view that presidential motives in a move such as this would not matter is not only wrong; it is also outlandish. The view would legitimize any number of plainly unlawful and unconstitutional presidential actions — for example, ordering the Justice Department to prosecute only African American defendants or imposing a religious test for eligibility for a Cabinet post.

The contemplated revocation of security clearances offers an instructive example of why the Trumpian motive-doesn’t-matter outlook is legally untenable. The power to determine access to classified information rests securely and solely with the president; it is no less absolute than the power to pardon.

Moreover, Congress has passed laws authorizing the CIA director, a member of the executive branch, to revoke security clearances “whenever he shall deem such termination necessary or advisable in the interests of the United States.” Such a legal standard sounds close to the constitutional standard that team Trump is advancing: All the director need do is “deem” a termination advisable; motives would appear not to matter.

In 1988, the Supreme Court considered the provision regarding the CIA director’s authority in Webster v. Doe, a case brought by a former CIA employee who alleged that his security clearance had been revoked because he was gay. The court might have been expected to hold that the power to revoke lay in the unreviewable discretion of the executive branch. But that isn’t what happened. Chief Justice William H. Rehnquist, a proponent of strong executive power, joined the majority in holding that Congress had foreclosed statutory claims. Yet the justices also specified that Congress, notwithstanding the authorization law’s exceptionally broad language, hadn’t foreclosed “colorable constitutional claims” — claims that the revocation of the former CIA employee’s security clearance violated the due process and equal protection clauses and his right to privacy.

The plaintiff’s claims on constitutional grounds hinged on the alleged motive of executive-branch actors: discharging the employee because of his sexual orientation. The court’s confirmation that there were legitimate constitutional matters at stake implies that the otherwise lawful exercise of executive-branch powers can violate the Constitution if the executive has a constitutionally improper motive.

Justice Antonin Scalia was the lone dissenter in Webster , but his dissent reaffirmed the principle. Scalia disagreed about whether Congress had intended to foreclose judicial review of even constitutional claims. But like the majority, he recognized their existence. Scalia wrote that the CIA director “does not have the authority to dismiss in violation of the Constitution, nor could Congress give it to him.” He provided the following example: “An action for backpay by a dismissed Secretary of State claiming that the reason he lost his Government job was that the President did not like his religious views — surely a colorable violation of the First Amendment.”

Scalia, the avatar of conservative thought and presidential power, understood what the current administration does not: Motive matters. If Trump is brazen enough to make good on his threats to revoke the security clearances of officials of previous administrations whose views he dislikes, he may well be starting down the road to a judicial rebuke that amounts to a historic condemnation of his conduct in office.