Attorney General Bill Barr resigned Monday touting President Trump’s record and accomplishments, despite what he called a “partisan onslaught” and “relentless, implacable resistance.”

Barr, who will leave the Justice Department next week, had his departure announced by President Trump on Twitter Monday evening.

“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!” Trump tweeted. “As per letter, Bill will be leaving just before Christmas to spend the holidays with his family.”

Trump also tweeted a copy of Barr’s resignation letter, in which the attorney general praised the president and made the comments about Trump’s constant opposition.

Trump added: “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!”

Barr, who served as attorney general for former President George H.W. Bush, wrote in his resignation letter that he is ”greatly honored that you called on me to serve your Administration and the American people once again as Attorney General.”

“I am proud to have played a role in the many successes and unprecedented achievements you have delivered for the American people,” Barr wrote.

Barr noted that he discussed the Justice Department’s review of voter fraud allegations in the 2020 election with the president on Monday, and “how these allegations will continue to be pursued.”

“At a time when the country is so deeply divided, it is incumbent on all levels of government, and all agencies acting within their purview, to do all we can to assure the integrity of elections and promote public confidence in their outcome,” Barr wrote.

Earlier this month, Barr said that the Justice Department had not yet found widespread evidence of voter fraud.

In his letter, though, Barr went on to tout Trump’s record, calling it “all the more historic because you accomplished it in the face of relentless, implacable resistance.”

“Your 2016 victory speech in which you reached out to your opponents and called for working together for the benefit of the American people was immediately met by a partisan onslaught against you in which no tactic, no matter how abusive and deceitful, was out of bounds,” Barr wrote.

“The nadir of this campaign was the effort to cripple, if not oust, your Administration with frenzied and baseless accusations of collusion with Russia,” Barr continued. “Few have weathered these attacks, much less forge ahead with a positive program for the country.”

Barr touted Trump’s economy, calling it “the strongest and most resilient” in American history, and one “that brought unprecedented progress to those previously left out.”

“You have restored American military strength. By brokering historic peace deals in the Mideast you have achieved what most thought impossible,” Barr wrote. “You have curbed illegal immigration and enhanced the security of our nation’s borders. You have advanced the rule of law by appointing a record number of judges committed to constitutional principles.”

Barr also praised the administration for Operation Warp Speed, saying the president “delivered a vaccine for coronavirus on a schedule no one thought conceivable,” calling it a “feat that will undoubtedly save millions of lives.”

Barr said that during his time at the Justice Department, officials have worked “tirelessly to protect the public from violent crime; worked closely with leaders in Mexico to fight drug cartels; cracked down on China’s exploitation of our economy and workers; defended competition in the marketplace, especially the technology sector; and supported the men and women of law enforcement who selflessly—and too often thanklessly—risk their lives to keep our communities safe.”

Barr’s resignation comes after reports that he was considering stepping down, possibly before the end of the year.

A senior Justice Department official, though, told Fox News last week that Barr intended to stay at his post “as long as the president needs him.”

His resignation also comes less than a week after President-elect Joe Biden’s son Hunter Biden confirmed he was under federal investigation for his “tax affairs.”

The president, over the weekend, called Barr a “big disappointment,” noting that the nation’s top lawyer knew about the federal probe into his opponent’s son and did not disclose it before Election Day.

“Why didn’t Bill Barr reveal the truth to the public, before the Election, about Hunter Biden. Joe was lying on the debate stage that nothing was wrong, or going on – Press confirmed” Trump tweeted over the weekend. “Big disadvantage for Republicans at the polls!”

A source told Fox News, though, that the president did not ask for Barr’s resignation.

Barr has been an ally of the president’s with regard to the origins of the investigation into the Trump-Russia probe.

Barr, last year, appointed U.S. Attorney John Durham from Connecticut to review the origins of the FBI’s original Trump-Russia investigation.

In October, Barr appointed Durham as special counsel to ensure that his investigation could continue into the next administration. Barr did not make the Durham appointment public until earlier this month.

“On May 13, 2019, I directed John Durham, U.S. Attorney for the District of Connecticut, to investigate certain intelligence and law-enforcement activities surrounding the 2016 presidential election,” Barr wrote in a letter to the Senate and House Judiciary Committees dated Dec. 1.

“Although I had expected Mr. Durham to complete his work by the summer of 2020, the COVID-19 pandemic, as well as additional information he uncovered, prevented him from doing so.

Barr said he “decided to appoint Mr. Durham as a Special Counsel to provide him and his team with the assurance that they could complete their work, without regard to the outcome of the election” and that he appointed Durham with “the powers and authority of a Special Counsel” on Oct. 19.

In a scope order, obtained by Fox News, Barr stated that Durham “is authorized to investigate whether any federal official, employee, or any other person or entity violated the law in connection with the intelligence, counter-intelligence, or law-enforcement activities directed at the 2016 presidential campaigns, individuals associated with those campaigns, and individuals associated with the administration of President Donald J. Trump, including but not limited to Crossfire Hurricane and the investigation of Special Counsel Robert S. Mueller, III.”

Under U.S. code, the special counsel would produce a “confidential report” and is ordered to “submit to the Attorney General a final report, and such interim reports as he deems appropriate in a form that will permit public dissemination.”

But Democrats, including House Judiciary Committee Chairman Rep. Jerrold Nadler, D-Calif., have criticized Barr throughout his tenure, claiming he politicized the Justice Department.

“From misleading the American public about the Mueller report to his dangerous efforts to overturn COVID safety measures, from his callous disregard for civil rights to his rampant politicization of the Justice Department, William Barr was willing to do the President’s bidding on every front but one,” Nadler said in a statement. “Barr refused to play along with President Trump’s nonsensical claims to have won the election.  He is now out as Attorney General one month early.”

But Republicans, like Senate Judiciary Committee Chairman Lindsey Graham, R-S.C., whose panel is also investigating the origins of the Trump-Russia probe, praised Barr calling him “the right man at the right time in overseeing highly political investigations.”

Graham said he has “nothing but total respect and admiration” for Barr and his work as attorney general, and said he has “much to be proud of.”

“When it came to the law, he played it straight,” Graham said.