Touted as a President Donald Trump loyalist who was assigned the task of overseeing the administration's law and order message, Attorney General William Barr on Monday said he would resign next week. The announcement comes shortly after he dealt a compelling blow to the president's dubious claims of widespread voter fraud.

Barr's decision to resign was announced by Trump on Twitter shortly after counting in the Electoral College confirmed President-elect Joe Biden's victory with more than the 270 votes required to formally secure the presidency. Despite increasing tensions between Barr and the president that was made public recently, Trump labeled Barr's departure as conflict-free.

In his tweet, Trump said he and Barr had a very nice meeting at the White House, adding that their relationship has been a very good one, and he has done an outstanding job. Referring to the resignation letter, Trump confirmed that Barr would be leaving ahead of Christmas to spend the holidays with his family.

He confirmed that Deputy Attorney General Jeff Rosen would be serving as Acting Attorney General in a follow-up tweet. Trump described Rosen as an outstanding person while noting that highly respected Richard Donoghue will be taking over the duties of Deputy Attorney General.

Although Trump's message comes across as cheerful, he has been considering firing Barr as recently as Sunday, according to people familiar with the matter. Officials did not believe the president would dismiss his attorney general immediately.

Aides had urged Trump to refrain from firing Barr over the past several months, so the president found a compromise way of seeing him out by claiming he had a very good relationship with him. Aides, however, suggest the two men's relationship wasn't very good, CNN reported.

On Friday, Trump told officials in a meeting that he wanted to fire Barr, and he did not seem to have changed his decision over the weekend. A White House official said Barr was neither fired nor forced out, insisting that the meeting between the two men on Monday afternoon wasn't fierce, but a very amicable one.

Much to the chagrin of Trump and his aides, Barr told the Associated Press in an interview that he did not find any evidence of widespread fraud in the recently concluded presidential election. This remark did not coincide with the president's re-election campaign pushing baseless claims that there has been fraud in the 2020 election.

Trump has refused to accept Biden's victory, insisting that the election was stolen from him by the Democrats. His legal drive to overturn the election results has not helped him either.