CNN  — 

Attorney General William Barr on Monday said he would resign next week, ending a tenure in which the President Donald Trump loyalist carried the administration’s “law and order” message but ultimately dealt the most credible blow to Trump’s unfounded claims that the 2020 election was littered with fraud.

His departure was announced by the President on Twitter moments after counting in the Electoral College put President-elect Joe Biden over the 270 votes needed to formally secure the presidency.

Despite escalating tensions between Trump and Barr that had burst recently into public view, the President framed Barr’s departure as amicable.

“Just had a very nice meeting with Attorney General Bill Barr at the White House. Our relationship has been a very good one, he has done an outstanding job! As per letter, Bill will be leaving just before Christmas to spend the holidays with his family,” Trump tweeted, announcing the news.

“Deputy Attorney General Jeff Rosen, an outstanding person, will become Acting Attorney General. Highly respected Richard Donoghue will be taking over the duties of Deputy Attorney General. Thank you to all!”

Despite Trump’s upbeat message, he had been seriously considering firing his attorney general as recently as Sunday, people familiar with the matter said, though officials did not believe he would go through with dismissing Barr immediately.

Over the past several months aides have discouraged Trump from firing Barr. The President seemed to find a compromise way of seeing Barr out by tweeting about his “very good” relationship with him.

But the two men’s relationship was not, by aides’ estimations, very good. Trump on Friday again told officials in a meeting he wanted to fire Barr, and over the weekend did not seem moved off his position.

Still, a White House official said Barr was not forced out or fired.

“He wasn’t asked to resign,” the official said, insisting there were no fireworks during the meeting between Trump and Barr on Monday afternoon. “It was a very amicable meeting.”

Another person familiar with the matter described the meeting as “cordial.” Earlier in the day, White House press secretary Kayleigh McEnany said in an interview on Fox News that Trump had been frustrated with Barr in recent days.

In his letter, Barr said that allegations of voter fraud would continue to be reviewed, despite affirming earlier this month there had been no widespread evidence of widespread fraudulent voting. He also praised the President for persisting despite what he described as relentless political opposition.

“Your record is all the more historic because you accomplished it in the face of relentless, implacable resistance,” Barr wrote.

“No tactic, no matter how abusive and deceitful, was out of bounds,” Barr went on. “The nadir of this campaign was the effort to cripple, if not oust, your administration with frenzied and baseless accusations of collusion with Russia.”

A staunch defender

Barr repeatedly and unapologetically prioritized Trump’s political goals while furthering his own vision of expansive presidential power. In his most notorious move, Barr delivered a misleading summary of special counsel Robert Mueller’s report, essentially clearing Trump in the Russia probe, which drew a sharp rebuke from Mueller himself.

He remained steadfast in his support of the President heading into Election Day, including by launching various operations across the country to combat violence and drug trafficking and reiterating Trump’s message not to participate in mail-in voting prior to the presidential election. He also appointed a special counsel to continue investigating one of Trump’s longtime infatuations, that intelligence and law enforcement violated the law in investigating the 2016 Trump campaign.

But the decision from the former attorney general to rebuke the President’s false claims of widespread fraud in his loss to Democrat Joe Biden represented a final failure of Trump’s often successful attempt to weaponize the Justice Department as a personal and potent political weapon.

Following the 2020 election, Trump’s legal team filed dozens of civil lawsuits in federal and state courts across the country in an effort to prove that Biden did not fairly win the election. Barr told the Associated Press in an interview on December 1 that the Justice Department had not found any such evidence.

“To date, we have not seen fraud on a scale that could have effected a different outcome in the election,” he said.

The President was frustrated with his attorney general’s comments to the AP and had a “contentious,” lengthy meeting at the White House the day they were published, according to a person familiar with the meeting.

By early December, Barr was considering leaving his post before January 20, the day Trump leaves office, a source with knowledge of the matter told CNN days after he buffed the President’s election fraud claims. The source said Barr was not happy with Trump and that the former attorney general “is not someone who takes bullying and turns the other cheek!”

No stranger to controversy

The attorney general echoed the President’s anger at coronavirus lockdowns, calling them, apart from slavery, “the greatest intrusion on civil liberties in American history.” Barr also asked for the Justice Department to take over the President’s defense in a defamation lawsuit filed against him by Jean E. Carroll, who accused him of sexual assault.

In one dramatic scene in June, Barr ordered authorities to disperse a large crowd of peaceful protesters near the White House so Trump could walk to the nearby historic St. John’s Church, where a fire had been set in the basement the previous night during unrest sparked by the police killing of George Floyd in Minneapolis.

His extraordinary decision to use force on the protesters underscored his commitment to Trump’s law and order message, and in the days following the incident, he defended his actions and claimed there was no connection between his order and a photo-op Trump staged at the church.

The attorney general also faced criticism for saying that systemic racism is not an issue in US law enforcement agencies, comments that came as throngs of people took to the streets across the country to protest police violence and racism.

“I think there’s racism in the United States still but I don’t think that the law enforcement system is systemically racist. I understand the distrust, however, of the African American community given the history in this country,” he said in an interview with CBS in June.

And he ordered his prosecutors to dismiss charges against Trump’s first national security advisor Michael Flynn, who has since been pardoned by the President.

Despite offering such service to the President, there had been signs that Trump has been becoming ever more frustrated with Barr. He lashed out against the attorney general before the election, complaining he had not indicted Obama-era officials for their role in the Russia investigation.

The tension suggested that for all of Barr’s apparent moves to placate Trump and his clear sympathy with the President over the Russia investigation in particular, he remained within the lines of evidence and legal procedure on the issue of election interference.

A tough public spot

Barr’s loyalty to Trump during his tenure at the Justice Department had sometimes put him in a tough public spot, including in September, when he was asked about Antifa, a left-wing group the Justice Department has claimed stirs protests toward violence.

The attorney general was asked to address Trump’s assertion that “thugs” had intimidated a passenger on a plane. Barr told CNN’s Wolf Blitzer at the time that authorities were tracking people who had flown from city to city to stir up violence, but did not give examples and said he didn’t know specifically what Trump was describing.

He made headlines last year when he suggested during testimony before the House Appropriations Committee that Trump’s campaign was spied on, saying he would be looking into the “genesis” of the FBI’s counterintelligence investigation that began in 2016 of potential ties between the campaign and the Russian government. He later defended the comment, saying he made it “off the cuff” and that he wasn’t using the word “spying” pejoratively.

Barr had also infuriated Democrats when he took two days after Mueller gave him his probe’s findings in March 2019 to announce in a letter that the special counsel “did not find” that any Trump campaign associates coordinated with Russian interference in the election, and that Mueller “did not draw a conclusion – one way or the other” about whether the President obstructed justice. His pronouncements prompted Trump to proclaim “no collusion” and “no obstruction.”

Mueller objected – first in a letter to Barr, then in a public statement and again when he testified to Congress last year. Barr’s rollout “did not fully capture the context, nature, and substance of this Office’s work and conclusions” of the report, Mueller said. The special counsel had documented multiple links between Trump campaign officials and Russian government-linked people.

In an echo of the appointment of Mueller, Barr in early December appointed Connecticut US Attorney John Durham to act as special counsel investigating the 2016 election. The appointment virtually ensured that Durham will keep his investigation and doubled down on one of Trump’s longtime infatuations – that national security and criminal concerns about his campaign and Russia in 2016 sullied the legitimacy of his election and presidency.

The move left a political bomb ticking for Trump’s successor and his new attorney general.

This story has been updated with additional reporting on Monday.

CNN’s Stephen Collinson, Katelyn Polantz, Evan Perez, Caroline Kelly, Paul LeBlanc, David Shortell, Jamie Gangel and Jim Acosta contributed to this report.