US Attorney General William Barr, the nation's top law enforcement official, has resigned on the day President Donald Trump formally lost the election while his administration begins to unravel.
Barr, who has faced a barrage of criticism of himself and the Justice Department from Trump, appeared to part on good terms on Monday.
Barr gave a nine-day notice in his resignation letter from the cabinet post with powers that include those equivalent to a home minister in India.
Trump announced Barr's resignation on Twitter and asserted, "Our relationship has been a very good one, he has done an outstanding job!"
"Few could have weathered these attacks, much less forge ahead with a positive program for the country," Barr said in his resignation letter and went on to list what he said were Trump's achievements like the pre-Covid-19 economy, the speed with which the vaccine for the disease was developed and the curbing of illegal immigration.
Barr said that he had updated Trump on the Justice "Department's review of voter fraud allegations in the 2020 election and how these allegations will continue to be pursued."
His resignation had been rumoured for several days and finally happened after the electoral college formally elected Joe Biden as the next president following the failure of Trump's legal challenges to the election alleging widespread fraud.
Trump has complained that Barr did not publicly speak about the reported investigation by government agencies of the dealings of Biden's son Hunter, which could have helped Trump in the election.
"Why didn't Bill Barr reveal the truth to the public, before the Election, about Hunter Biden," Trump tweeted last week.
He also expressed displeasure that Barr did not publicise the findings of a prosecutor appointed by him to look into the origins of a flawed Federal Bureau of Investigation into allegations of Trump campaign colluding with Russia in the 2016 election.
There have been other instances of Trump with his incessant tweets and comments about the Justice Department annoying Barr.
An exasperated Barr once told a TV programme that these made it "impossible for me to do my job".
William Barr, who had held the attorney general's position from 1991 to 1993 when George Bush the elder was president, was brought in by Trump in February last year after he fired Jeff Sessions.