WASHINGTON ― Deputy Attorney General Rod Rosenstein, who endured months of criticism from President Donald Trump after appointing Robert Mueller as special counsel to investigate the Trump campaign and Russian interference in the 2016 election, will step aside next month after a lengthy career at the Justice Department.

Rosenstein, in a resignation letter effective May 11 that the Justice Department released Monday, told Trump he was grateful for the “courtesy and humor” he said the president often displayed in personal conversations and highlighted his work on the Trump administration’s priorities.

In recent speeches, Rosenstein has selectively quoted Trump’s references to the rule of law while ignoring the president’s broad attacks on the Justice Department and FBI. Certain lines in his resignation letter could be read as slights to Trump, such as a paragraph focused on the Justice Department’s “special responsibility to avoid partisanship” and make decisions based on the facts.

“We enforce the law without fear or favor because credible evidence is not partisan, and the truth is not determined by opinion polls,” Rosenstein wrote. “We ignore fleeting distractions and focus our attention on the things that matter, because a republic that endures is not governed by the news cycle. We keep the faith, we follow the rules, and we always put America first.”