Attorney General William Barr, vilified witlessly and unreasonably for years by the left — and more recently by conservatives — has just performed two critically important services to the republic:

After the election, Barr refused to put his name or the Department of Justice behind any of President Donald Trump's wild claims — without evidence — that the presidential election was stolen by Democrats and President-elect Joe Biden.

And before the election, Barr quietly appointed a special prosecutor to investigate what is known as the "Obamagate" scandal, the origins of now-discredited allegations that Trump's 2016 campaign colluded with Russia to influence the outcome that year.

Now that U.S. Attorney John Durham has been made special prosecutor, it will be politically difficult for Biden to kill the investigation. Durham is looking into decisions at the FBI and other intelligence agencies under the Obama-Biden administration to focus on Trump's 2016 presidential effort, to gather information on his campaign apparatus, and to delegitimize the Trump administration in its early days.

These witless, tribal times we live in didn't begin with Trump. We've been living like this for more than a decade. And that old line about you've probably done your job when both sides hate you seems just about right.

Barr served as attorney general under the late President George H.W. Bush in the early 1990s. He then made a great living in the private sector in the telecommunications industry. He didn't need to return to government.

But in an interview in Chicago before the election, Barr told me that he felt he owed a debt to the Justice Department and his country.

He felt that Justice had been politically weaponized against the opposition. And he worried about the long-term implications of all this on the republic.

Angry rhetoric, bad tweets, hurt feelings and never-ending virtue signaling might not destroy the republic. But a weaponized Justice Department would destroy it.

If the FBI and CIA were seen by the people to be little more than political hit squads directed by political bosses, we wouldn't have a republic.

"I had a very nice life," Barr told me in that interview. "But I saw what was going on with the attempt to use the Justice Department as a political weapon and I felt the department was being buffeted, and I was concerned about it ... I kept pushing other people for these jobs ... I started thinking to myself, the only reason I was saying no was because of my personal comfort, and I felt that these are important times for the country."

There has been no personal comfort for Barr. His refusal to play the role of Trump's "wingman" — as former Attorney General Eric Holder described his own role with former President Barack Obama — on allegations of election fraud infuriates the president.

"To date," Barr told the Associated Press, "we have not seen fraud on a scale that could have effected a different outcome in the election."

Later Trump was asked by NBC News if he still had confidence in Barr.

"Ask me that in a number of weeks from now," said Trump. And the Barr resignation stories began.

It's not that Barr wasn't concerned about possible fraud with the massive mail-in vote that gave the victory to Biden. He was. Many grown-ups worried there would be problems with this new system. But the states decide how they run their elections, even states run by Republican state legislatures and Republican governors.

The problem is that when you're a grown-up, you feel obliged to act like one. And Barr is a grown-up. He knows that speculation — no matter how impassioned — is not evidence in a court of law.

The president continues telling anyone who will listen that the election was stolen. I know many Republicans who believe this. But belief isn't enough for me. I need hard evidence. I haven't seen it.

The U.S. Supreme Court hasn't either. On Tuesday it rejected a Republican effort to overturn the presidential election results in Pennsylvania.

You don't overturn an election on speculation without evidence. That's something done in banana republics.

And speaking of banana republics, the other service Barr performed for his country was naming Durham, the U.S. attorney in Connecticut, as special prosecutor. That gives him more protection once Biden is president.

Trump had been pushing for Barr to release Durham's report before the election. But Barr refused to allow the Department of Justice to become the president's political cudgel.

Yet there has already been evidence of misconduct by the FBI as found in Inspector General Michael Horowitz's report.

FBI agents relied on the so-called Steele dossier — opposition research paid for by an affiliate of Hillary Clinton's campaign — to obtain warrants to put members of the Trump campaign under surveillance.

Some agents misled judges at the Foreign Intelligence Surveillance Court to obtain warrants to allow them to monitor Trump campaign adviser Carter Page. The Justice Department later had to backtrack and admit it never had probable cause to spy on Page.

FBI lawyer Kevin Clinesmith has pleaded guilty to falsifying documents sent to the FISA court.

There is more to come.

Democrats and their media allies who carried the water on the failed Russia story want Durham's investigation dead and buried. But it lives on.

Republicans and their media allies wanted Barr to support Trump's claims about a stolen election, and Barr wouldn't agree.

In Washington, they'll never name a bridge after Barr. Or a fountain. They won't commission a statue of a rumpled guy who loved a drink and a steak.

But William Barr did his job.