Deputy Attorney General Rod Rosenstein announced his resignation on Monday.

Rosenstein, who appointed Robert Mueller as special counsel for the Russia investigation, said in a letter his resignation would be effective May 11.

“We enforce the law without fear or favor because credible evidence is not partisan, and 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,” he added in the letter.

Rosenstein frequently became the subject of criticism from President Donald Trumpespecially following his hiring of Mueller in May 2017. Not long after he was named deputy attorney general, Rosenstein penned a memo blasting former FBI Director James Comey and his inquiry into Russian meddling in the 2016 election. Trump fired Comey shortly before Mueller was appointed as special counsel.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

The Washington Post recently revealed Rosenstein even begged Trump to let him keep his job after the president found out about a New York Times report that said Rosenstein had suggested wearing a wire to record conversations with Trump. Rosenstein had also allegedly sought support from Cabinet members to invoke the 25th Amendment and remove Trump from office.

Many Democrats have voiced criticism of both Rosenstein and Attorney General William Barr for being overly favorable toward Trump in their summary of the Mueller report.

Trump had repeatedly called for Rosenstein to be fired. However, his advisers cautioned him against doing this.