Jeff Sessions leaves office with one of the oddest legacies of any attorney general in American history.

Sessions' tenure as attorney general was a disaster for minorities and immigrants. He might've perjured himself during his confirmation hearings. He tried to jumpstart a drug war that nearly everybody else in public life was ready to abandon. He undercut legal protections for LGBTQ Americans. By any number of measures, the Department of Justice is a less-faithful advocate for actual justice than when he took the helm nearly two years ago.

But it must also be admitted that Sessions performed his job with integrity under pressure.

Consider: He recused himself from overseeing the department's investigation into the 2016 campaign, which was the right thing to do. He did so even though it infuriated his boss, President Trump, who hated the resulting probe by Special Counsel Robert Mueller. And Sessions held fast to that correct position even though Trump then subjected him to a campaign of high-profile humiliation, a transparent effort to get the attorney general to quit, one of the most sustained acts of passive-aggression ever seen from a U.S. president.

That mix — bad policies, probity in the face of pressure — left even Sessions' fiercest critics somewhat discombobulated by the time his ouster was made official on Wednesday afternoon.

Take the ACLU:. It greeted Wednesday's news by lambasting him as "the worst attorney general in modern American history. Period." But in the very same tweet, the organization fretted about the meaning of his dismissal:

Two tweets later, the organization again decried Sessions for allowing "the DOJ to function as the political arm of the Trump administration" — and also demanded that his replacement, like Sessions himself, not interfere with the special counsel investigation.

Was he a hero or villain? Sessions, it turns out, might've been both. Or neither. The only real certainty at this point is that historians will have a hell of a time trying to assess the man and his time in office.

If our understanding of Sessions will need a lengthy untangling, though, his tenure and dismissal have provided startling clarity into what we know about President Trump. The occupant of the Oval Office is a mean-spirited narcissist, a man who believes that being given the keys to the White House entitles him to ownership of the federal government instead of stewardship. Trump demands loyalty, fealty even, without giving any in return. And the results of those deep-seated personality flaws reverberate throughout government.

When Sessions was still a U.S. senator from Alabama, he became one of the first high-profile politicians to endorse Trump's then-nascent, seemingly improbable presidential campaign. For that early show of faith, he was rewarded with a Cabinet position.

Trump threw him under the bus at the first sign of trouble, however. After the recusal, Trump made it clear he believed the attorney general's first priority was to serve the president's interests — duty to the nation or to professional ethical standards, it was clear, were impediments to that requirement. He began savaging Sessions at every public opportunity. "I don't have an attorney general," he moaned in September.

Is any of this a surprise? Not really: Trump is exactly the man he's appeared to be during his decades as a developer-cum-celebrity. The only shocking development is that so many observers hoped and expected he'd grow into the job. It was, unsurprisingly, a false hope.

All of this means that circumstances in the Department of Justice can get worse — and probably will. Sessions' interim replacement, Matthew Whitaker, enters the office with full awareness of Trump's expectations — and he's taking oversight of Mueller's investigation. The next days and weeks may bring the ongoing crisis that is this presidential administration to a new and unprecedented boiling point.

Sessions may be grateful to miss out. It seems likely that future biographers will blister him for many of the actions he took as attorney general — but it's also quite possible he'll end up in some future edition of Profiles in Courage. People are complicated, and that includes politicians. But Trump has spent his time in office trying to erase the lines between truth and falsehood.

Perhaps one result is that we can no longer tell the difference between heroes and villains.