Deputy Attorney General Rod Rosenstein submitted his resignation letter to President Trump on Monday, ending his tumultuous career at the Justice Department.

Rosenstein — who was formerly the senior Justice Department official in charge of the special counsel’s probe into Russia — offered his gratitude in the letter obtained by the Wall Street Journal.

“I am grateful to you for the opportunity to serve; for the courtesy and humor you often display in our personal conversations; and for the goals you set in your inaugural address: patriotism, unity, safety, education and prosperity,” Rosenstein wrote.

His resignation is effective May 11.

Rosenstein was, at times, a target of Trump for his oversight of Robert Mueller’s probe into whether the Trump campaign worked with Russia to interfere with the 2016 election.

Rosenstein inherited the role of overseeing the probe when former attorney general Jeff Sessions recused himself from overseeing the investigation.

Attorney General William Barr took over the Mueller probe when he was confirmed in February.