While the White House was on defense over Russia, Sessions was a bedrock amid the storm — all the more effective because he was unencumbered by the Mueller investigation. A Southern gentleman who could counterbalance Trump’s bombast, he was deferential to the president and never humiliated the White House with a scandal over ordering furniture that costs more than a steelworker’s salary.

As head of the Justice Department, Sessions cranked through conservative achievements on immigration, drugs, crime, and civil rights reversals that fueled Trump’s base, offering stability to the administration and sending Democrats into hysterics.

But it’s hard to conceive of an attorney general more aligned with Trump’s agenda and capable of accomplishing it than Sessions, a former US attorney and senator.

As Sessions quit, much of the country began asking who will take his place long-term. But the far right took a moment to laud their victory (“He never should have been hired,” David Wohl, a campaign surrogate for Trump, tweeted ). The next attorney general could stymie the Russia investigation led by Robert Mueller, which Sessions had recused himself from, possibly freeing Trump from that albatross.

“Coward @jeffsessions has to go,” one account said Wednesday, minutes before Sessions finally resigned at the president’s request. “He is traitor of GOP and Trump. He is puppet of Democrats.”

President Trump’s allies have been itching for months for him to fire Attorney General Jeff Sessions, failing to acknowledge that it’s Sessions, arguably even more than Trump, who has shaped much of the anti-immigrant, anti-LGBT domestic policy agenda that the Republican base loves.

But Trump often stumbled when trying to furnish his base with popular policies. For example, Trump’s big, beautiful wall still isn’t built (or funded). Trump’s executive order to cut off sanctuary cities? It’s been blocked by courts. His plans to ban transgender military service? That, too, has been blocked in court. Ending DACA? Same fate.

In contrast, perhaps no issue better represents Sessions’ surgical effectiveness — and harmony with Trump’s central cause — than his tight grip on immigration.

Sessions marched ahead with an itinerary of near-daily press events where he rolled out lawsuits and policies that framed the administration the way it wanted to be seen. Sessions told immigration law judges, who operated under his watch, to show less “sympathy” for those seeking asylum, while speeding up cases and accelerating deportations. He ordered those judges to stop granting asylum to certain domestic abuse and gang violence victims, reversing a policy from the Obama administration. Perhaps most famously, Sessions was the architect of the “zero tolerance” border policy that led to family separations (which infuriated progressives). “If you are smuggling a child, then we will prosecute you and that child will be separated from you as required by law,” Sessions intoned at a press event at the border before the policy was enacted.

Meanwhile, he instructed US attorneys to prioritize border cases against first-time offenders. And throughout his tenure, Sessions prosecuted members of MS-13, a gang with ties to Mexico and Central America. He has also cut off tens of millions of dollars from most sanctuary cities, with the permission of the Seventh Circuit Court of Appeals, a major cause of the right.

Sessions was as xenophobic as Trump and eager to accuse Democrats of fomenting crime, while demonstrating the skill of a seasoned politician to actually accomplish the administration’s goals.

Sessions brought results on other key issues. He issued a memo that said it is legal to fire people simply for being transgender, while arguing the same to the Supreme Court last month. He argued in another case it’s legal to fire gay workers, and he argued at the Supreme Court that it’s legal for a baker turn away gay customers trying to buy a wedding cake — a case the baker won, with Sessions’ backing.

While Trump’s voter fraud commission flopped, and one member turned over documents refuting the premise of mass voter fraud, Sessions made headway. He demanded that states hand over troves of election data, a move that was widely seen as pressuring states to purge their voter roles or risk being sued. The Justice Department went on to charge 19 foreigners in August with illegal voting.

Trump has vowed to crack down on drugs, but it’s Sessions who reinstated long mandatory minimum sentences for drug crimes, while incentivizing local cops to seize property from suspects. He’s shifted back toward private prisons, while pushing to make transgender women share quarters with male prisoners. Sessions, meanwhile, led a fight to block undocumented women from getting abortions.

Sessions also stopped the civil rights investigations into local police accused of unconstitutional use of force and racial profiling, instead attempting to block a police reform settlement in Chicago.

All the while, Trump supporters denounce the Russia investigation for distracting from Trump’s actual agenda — but ironically, they want to punish the attorney general who’s been at the vanguard of manifesting that agenda all along.

If a replacement attorney general does intervene with Mueller’s Russia investigation, it will become a consuming job, if not a tar pit of scandal. And that sort of intervention will all but guarantee that the replacement AG can’t invest in the conservative agenda as much as Sessions did.

Trump said Wednesday the acting attorney general will be Matt Whitaker — who said in a CNN op-ed that Mueller’s Russia probe was “going too far” — and he will oversee the Russia probe instead of Deputy Attorney General Rod Rosenstein. If Whitaker tries to end the Russia inquiry, he may become riddled by public scrutiny, while stealing the limelight — the sort of official that Trump has shown time and again he will replace (Corey Lewandowski, Sean Spicer, Anthony Scaramucci, and Steve Bannon among them).

Terminating Sessions and then installing a more malleable replacement could put Trump right back where he is now, but with even more scrutiny over Russia and an attorney general less capable of enacting Trump’s agenda.