Sessions went on to tout his work in fostering Trump's directive to make the agency he led until today a "law and order Department of Justice." He specifically mentioned the DOJ's work on firearms, immigration, and the opioid crisis, before offering his thanks to law enforcement.

"Most importantly, in my time as Attorney General we have restored and upheld the rule of law — a glorious tradition that each of us has a responsibility to safeguard," Sessions wrote. "We have operated with integrity and have lawfully and aggressively advanced the policy agenda of this administration."

President Trump was pleasant to Sessions on Twitter, writing, "We thank Attorney General Jeff Sessions for his service, and wish him well!"

Sessions was a senator from Alabama, and one of the first Republicans to support Trump on the campaign trail in 2015, as noted by Politico. But the relationship between the president and his attorney general deteriorated in the past year.

"Sessions will not be part of a game in which Trump rants and whines while the effectiveness and trust of America’s Justice Department erodes," Ed Rogers wrote in an op-ed for The Washington Post in June. "Rather than silently play along, Sessions will be hypersensitive to any harm being done to the department, and he will do what is in the department’s best interest."

"The president has lost confidence in Jeff Sessions. I'm telling you what everybody in the country knows. This is a dysfunctional relationship, we need a better one," Senator Lindsay Graham (R-SC) said in August on the Today show, according to CNN. "This relationship is beyond repair, I think," Graham continued. "I'm not asking him to be fired, but the relationship is not working."

Trump wrote on Twitter that a permanent replacement will be determined later, but also announced that Matthew G. Whittaker, Sessions's DOJ chief of staff, will take over as acting attorney general for the time being.