US Attorney General Jeff Sessions has been fired by President Donald Trump.

"We thank Attorney General Jeff Sessions for his service, and wish him well!" Mr Trump tweeted on Wednesday.

The president had repeatedly criticised his top law enforcement official after he recused himself from the Russia investigation dogging the White House.

Mr Trump said Mr Sessions will be temporarily replaced by his chief of staff, Matthew Whitaker, who has criticised the Russia inquiry.

In a resignation letter, Mr Sessions - a former Alabama senator who was an early supporter of Mr Trump - made clear the decision to go was not his own.

"Dear Mr President, at your request I am submitting my resignation," he wrote in an undated letter.

"Most importantly, in my time as attorney general, we have restored and upheld the rule of law," Mr Sessions added, while thanking the Republican president.

According to a White House official, Mr Trump's Chief of Staff John Kelly called Mr Sessions on Wednesday before Mr Trump held a press conference to discuss mid-term election results.

Why was Sessions fired?
Mr Trump has repeatedly pilloried his top law enforcement official since Mr Sessions stepped aside from the Russia inquiry in March 2017.

Special Counsel Robert Mueller is hunting for evidence of potential collusion between the Trump presidential campaign and Moscow.

The wide-ranging investigation - overseen by the Department of Justice - has resulted in a series of criminal charges against several Trump associates.

In July 2017 Mr Trump told the New York Times: "Sessions should have never recused himself, and if he was going to recuse himself, he should have told me before he took the job and I would have picked somebody else."

Mr Sessions voluntarily removed himself from the probe after Democrats accused him of failing to disclose contacts with the Russian ambassador during his Senate confirmation hearing.

The attorney general later said he had forgotten about those meetings, which happened during the Trump election campaign.

Mr Trump has at various times belittled Mr Sessions as "VERY weak" and "DISGRACEFUL".

What happens now?
CBS News is reporting that Deputy Attorney General Rod Rosenstein is no longer leading the Mueller inquiry, and that Matthew Whitaker will now assume control.

The president cannot directly fire the special counsel, whose investigation Mr Trump has repeatedly decried as a witch hunt. But Mr Sessions' replacement will have the power to fire Mr Mueller or end the inquiry.

Mr Rosenstein was summoned to the White House on Wednesday for what was described as a previously scheduled meeting.

It was the deputy attorney general who appointed Mr Mueller to lead the Russia inquiry, after Mr Trump fired FBI director James Comey in May 2017.

The special counsel's probe has also been investigating whether Mr Comey's firing amounted to attempted obstruction of justice.

There has also been a question mark over Mr Rosenstein's future since it was reported he had discussed invoking a constitutional clause to oust President Trump.

This summer he was abruptly summoned to the White House amid fevered speculation he was about to be fired, however, no announcement came.

The presidential axe that had been hovering over Jeff Sessions for what has seemed like an eternity just came swinging down with a thud. Donald Trump had previously said he would wait until after the mid-term elections to decide his attorney general's fate, and he did - but just barely.

And like that the duties of overseeing Robert Mueller's Russia investigation shift from the man who appointed the special counsel, Rod Rosenstein, to a man who has been a critic of it, Department of Justice Chief of Staff Matthew Whitaker.

In an opinion piece for The Hill before he took the Department of Justice job, Mr Whitaker wrote that calls for an as yet-to-be-named independent prosecutor would be "just craven attempts to score cheap political points". In April 2017, he wrote for CNN that any Mueller investigation into the president's finances would be "going too far".

What happens next is critical. Mr Mueller's inquiry could continue unabated - although the special counsel must surely be considering tightening his timeline. There is also the possibility, however, that this is just the opening move of a White House effort to shut down the probe or keep its findings out of the public eye.

What's the reaction?
Democrats were outraged by the attorney general's removal, with the Democratic National Committee noting that the appointee has not been confirmed for the role by the US Senate as required.

The party's Senate leader Chuck Schumer tweeted: "Clearly, the President has something to hide."

"Given his previous comments advocating defunding and imposing limitations on the Mueller investigation, Mr Whitaker should recuse himself from its oversight for the duration of his time as acting attorney general."

Conservative author Ann Coulter praised the "Christ-like Jeff Sessions" for being "the only member of the Trump administration doing anything about immigration".

She called on Mr Trump to appoint Mr Sessions to head the Department of Homeland Security.

Republican Senator Lindsey Graham said he looks forward to "working with President Trump to find a confirmable, worthy successor so that we can start a new chapter at the Department of Justice".

Mr Graham, of South Carolina, had said last year there would be "holy hell to pay" if Mr Sessions was ever fired.

The senator was previously tipped as a replacement for Mr Sessions, but he seemed to take himself out of consideration on Wednesday, suggesting he would stay in the Senate.

House of Representatives Democratic leader Nancy Pelosi said: "It is impossible to read Attorney General Sessions' firing as anything other than another blatant attempt by President Trump to undermine & end Special Counsel Mueller's investigation."