(Bloomberg Opinion) -- It’s hard to think of a more unlikely human rights hero than Kirstjen Nielsen, the outgoing secretary of homeland security. But if CNN’s reporting is accurate, Nielsen actually did sacrifice her job for the legal rights of asylum seekers when President Donald Trump instructed her to deny entry to immigrants who are protected by international refugee law.

Nielsen also reportedly has spent the last several months resisting Trump’s pressure to separate families at the Mexican border, a policy that has been blocked by several courts while litigation against it continues.

To be clear, I hold no brief for Nielsen, who presided over the Department of Homeland Security during what will no doubt be remembered as one of the most inhumane eras in U.S. immigration policy and practice.

And the department under Nielsen doesn’t have a great record in front of the courts. To take just the most recent example, a federal district court in California on Monday blocked Homeland Security from implementing a policy that would return Central American asylum seekers to Mexico while they await hearings.

The court held that the policy, adopted by Nielsen, couldn’t be justified under existing statutes. For good measure, it added that even if the policy had been authorized, it wouldn’t have sufficiently protected the asylum seekers’ right not to be put in danger of being returned to a place where their safety would be in jeopardy.

That’s not even to mention the family separation policy, which courts have preliminarily treated as presumptively unlawful.

Nonetheless, Nielsen’s apparent stand in favor of the rule of law, against a president whose signature reported response is “I don’t care,” is a small but significant step toward the rehabilitation of her tattered professional reputation.

Nielsen is a Trump conservative, to be sure. But she worked in the George W. Bush White House. It would seem that she possessed enough of the traditional respect for the law that she balked at overtly flouting what the executive branch itself considers its lawful duties.

There’s a crucial difference between the executive branch testing a policy at the outer bounds of its plausible authority and taking action it knows to be illegal.

Every administration loses court fights about the legality of some policies. That happened to President Barack Obama when the lower federal courts blocked his Deferred Action for Parents of Americans and Lawful Permanent Residents policy, or DAPA, which would have protected from deportation the parents of the so-called Dreamers.

The Homeland Security policies blocked by that court order were terrible policy, in my view. But legally speaking, they were (just) within the bounds of normalcy.

In contrast, Trump reportedly was telling Nielsen to violate the law that says asylum seekers have to be allowed into the country and can’t be sent back into danger. That federal law embodies a core treaty commitment of the U.S. It’s the central principle of refugee law, known by the French name “non-refoulement,” meaning roughly “non-return.”

And Trump was reportedly proposing that Homeland Security directly violate the court orders blocking family separation. That would be contempt of court, as well as a direct challenge to the authority of the judiciary to say what the law is.

This isn’t just about immigration law — not by a long shot. There’s a central constitutional principle at stake.

The constitution is meant to create “a government of laws, and not of men.” That phrase comes from the Massachusetts Constitution of 1780 (lead draftsman: John Adams), not from James Madison’s U.S. Constitution of 1787. But the same principle applies in both.

The idea goes all the way back to a debate between Plato and Aristotle. Plato thought a philosopher-king should make policy, because in his wisdom and statesmanship he would be able to fit the decision to the circumstances. Rules, he observed, would constrain the philosopher-king unhelpfully.

Aristotle, in contrast, thought that sound laws were necessary to limit and constrain human governors, who would otherwise tend toward tyranny. The American framers were squarely on Aristotle’s side. Fearful of the ever-present threat of corruption, they put their faith in written constitutional laws.

The difference between a government of laws and one of men is precisely that no individual, including the president, is ever outside the law. More than two years into his presidency, with an eye to re-election, Trump still has not gotten the message that he is subordinate to the law, not above it.

That’s why it is so important for his subordinates, including Nielsen, to insist that the law is the law. It may seem like a small thing to stand up to the president in this way. It isn’t.

Nielsen’s legacy at DHS isn’t a proud one.

But at least she went out the right way, as a symbol, however modest, that the rule of law is still alive and kicking, even as Trump continues his assault on the foundations of our constitutional system.

To contact the author of this story: Noah Feldman at nfeldman7@bloomberg.net

To contact the editor responsible for this story: Stacey Shick at sshick@bloomberg.net

This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.

Noah Feldman is a Bloomberg Opinion columnist. He is a professor of law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter. His books include “The Three Lives of James Madison: Genius, Partisan, President.”

©2019 Bloomberg L.P.