Attorney General Jeff Sessions has resigned as the country’s chief law enforcement officer at President Donald Trump’s request.

Sessions announced his plan to resign in a letter to the White House on Wednesday.

Trump announced in a tweet that Sessions’ chief of staff Matt Whitaker would become the new acting attorney general.

The attorney general had endured more than a year of stinging and personal criticism from Trump over his recusal from the investigation into potential coordination between Russia and the Trump campaign.

Trump blamed the decision for opening the door to the appointment of special counsel Robert Mueller, who took over the Russia investigation and began examining whether Trump’s hectoring of Sessions was part of a broader effort to obstruct justice.