US attorney general Jeff Sessions has been pushed out after enduring more than a year of blistering and personal attacks from President Donald Trump.

Mr Trump inserted in his place a Republican Party loyalist with authority to oversee the remainder of special counsel Robert Mueller’s Russia investigation.

The move has potentially ominous implications for Mr Mueller’s probe, given that new acting attorney general Matthew Whitaker, until now Mr Sessions’s chief of staff, has questioned the inquiry’s scope and spoke publicly before joining the Justice Department about ways an attorney general could theoretically stymie the probe.

Mr Whitaker said in a statement that he was committed to “leading a fair department with the highest ethical standards, that upholds the rule of law, and seeks justice for all Americans”.

He said Mr Sessions has been a “dedicated public servant for over 40 years” and called him a man of integrity “who has served this nation well”.

Congressional Democrats, concerned about protecting Mr Mueller, called on Mr Whitaker to recuse himself from overseeing the investigation in its final but potentially explosive stages.

That duty has belonged to deputy attorney general Rod Rosenstein, who appointed Mr Mueller.

Representative Jerry Nadler, the top Democrat on the House Judiciary Committee, said he wants “answers immediately” and “we will hold people accountable”.

The resignation, in a one-page letter to Mr Trump, came one day after Republicans lost control of the House of Representatives and was the first of several expected post-midterms Cabinet and White House departures.

Though Mr Sessions was an early and prominent campaign backer of Mr Trump, his departure letter lacked effusive praise for the president and made clear the resignation came “at your request”.

“Since the day I was honored to be sworn in as Attorney General of the United States, I came to work at the Department of Justice every day determined to do my duty and serve my country,” Mr Sessions wrote.

A copy of Jeff Sessions's resignation letter is photographed in Washington on an image of the exterior of the Justice Department
A copy of Jeff Sessions’s resignation letter (J David Ake/AP)

The resignation was the culmination of a toxic relationship that frayed just weeks into Mr Sessions’s tenure, when he stepped aside from the Russia investigation because of his campaign work and following the revelation that he had met twice in 2016 with the Russian ambassador to the US.

Mr Trump blamed the recusal for the appointment of Mr Mueller, who took over the Russia investigation and began examining whether Mr Trump’s hectoring of Mr Sessions was part of a broader effort to obstruct the probe.

The investigation has so far produced 32 criminal charges and guilty pleas from four former Trump aides.

But the work is not done and critical decisions await that could shape the remainder of Mr Trump’s presidency.

Mr Mueller’s grand jury, for instance, has heard testimony for months about Trump confidant Roger Stone and what advance knowledge he may have had about Russian hacking of Democratic emails.

Mr Mueller’s team has also been pressing for an interview with Mr Trump.

And the department is expected at some point to receive a confidential report of Mr Mueller’s findings, though it is unclear how much will be public.

Mr Trump had repeatedly been talked out of firing Mr Sessions until after the midterms, but he told confidants in recent weeks that he wanted Mr Sessions out as soon as possible after the elections, according to a Republican close to the White House.

The president deflected questions about Mr Sessions’s expected departure at a White House news conference.

Donald Trump's relationship with Jeff Sessions quickly soured
Donald Trump’s relationship with Jeff Sessions quickly soured (Evan Vucci/AP)

He did not mention that White House chief of staff John Kelly had called Mr Sessions beforehand to ask for his resignation.

The undated letter was then sent to the White House.

The Justice Department did not directly answer whether Mr Whitaker would assume control of Mr Mueller’s investigation, with spokeswoman Sarah Isgur Flores saying he would be “in charge of all matters under the purview of the Department of Justice”.

Mr Rosenstein remains at the department and could still be involved in oversight.

Without Mr Sessions’s campaign or Russia entanglements, there is no legal reason Mr Whitaker could not immediately oversee the probe.

And since Mr Sessions technically resigned instead of forcing the White House to fire him, he opened the door under federal law to allowing the president to choose his successor instead of simply elevating Mr Rosenstein, said University of Texas law professor Stephen Vladeck.

“Sessions did not do the thing he could have done to better protect Rosenstein, and through Rosenstein, the Mueller investigation,” Mr Vladeck said.

That left Mr Whitaker in charge, at least for now, though Democrats, including Representative Nancy Pelosi and Senator Chuck Schumer, said he should recuse himself because of his comments on the probe.

Mr Whitaker, a former US attorney from Iowa who twice ran unsuccessfully for statewide office and founded a law firm with other Republican Party activists, once opined about a scenario in which Mr Trump could fire Mr Sessions and then appoint an acting attorney general who could stifle the funding of Mr Mueller’s probe.

Matthew Whitaker
Matthew Whitaker (Charlie Neibergall/AP)

In that scenario, Mr Mueller’s budget could be reduced “so low that his investigation grinds to almost a halt”, Mr Whitaker said during an interview with CNN in July 2017 before he joined the Justice Department.

In a 2017 CNN op-ed, Mr Whitaker wrote: “Mueller has come up to a red line in the Russia 2016 election-meddling investigation that he is dangerously close to crossing.”

Mr Trump’s relentless attacks on Mr Sessions came even though the Alabama Republican was the first US senator to endorse Mr Trump and despite the fact his crime-fighting agenda and priorities, particularly his hawkish immigration enforcement policies, largely mirrored the president’s.

He found satisfaction in being able to reverse Obama-era policies that conservatives say flouted the will of Congress, encouraging prosecutors to pursue the most serious charges they could and promoting more aggressive enforcement of federal marijuana law.

He also announced media leak crackdowns and tougher policies against opioids, and his Justice Department defended a since-abandoned administration policy that resulted in migrant parents being separated from their children at the border.

But the relationship was irreparably damaged in March 2017 when Mr Sessions, acknowledging previously undisclosed meetings with the Russian ambassador and citing his work as a campaign aide, recused himself from the Russia investigation.

Mr Trump repeatedly lamented that he would have never selected Mr Sessions if he had known the attorney general would recuse himself.

The recusal left the investigation in the hands of Mr Rosenstein, who appointed Mr Mueller two months later after Mr Trump fired then-FBI director James Comey.

In piercing attacks, Mr Trump called Mr Sessions weak and beleaguered, complained that he was not more aggressively pursuing allegations of corruption against Democratic rival Hillary Clinton and called it “disgraceful” that Mr Sessions was not more serious in scrutinising the origins of the Russia investigation for possible law enforcement bias – even though the attorney general did ask the Justice Department’s inspector general to examine those claims.

The broadsides escalated in recent months, with Mr Trump telling an interviewer that Mr Sessions “never had control” of the Justice Department.

Mr Sessions endured most of the name-calling in silence, though he did issue two public statements defending the department, including one in which he said he would serve “with integrity and honour” for as long as he was in the job.