Rod Rosenstein, the US deputy attorney general who oversaw the special counsel inquiry into President Donald Trump's campaign and Russia, has resigned.
Mr Rosenstein, who had a fraught working relationship with Mr Trump, will step down on 11 May in a departure that had been expected for months.
In his letter, he paid tribute to Mr Trump, even praising the president's "courtesy and humour".
Mr Trump once tweeted an image showing Mr Rosenstein jailed for treason.
Mr Rosenstein - who was originally appointed by Republican President George W Bush - had been expected to resign in March following the appointment of William Barr as attorney general, reports the BBC.
But the justice department second-in-command stayed in the job a while longer to help Mr Barr manage a redacted public release of special counsel Robert Mueller's investigation.
The report did not determine that the Trump campaign had conspired with Russia to sway the 2016 election, but did not exonerate the president of obstruction of justice.
What does Rosenstein's resignation letter say?
In his letter, Mr Rosenstein praises some of what he calls the Department of Justice's achievements and its employees' "devotion to duty".
"I am grateful to you for the opportunity to serve; for the courtesy and humour you often display in our personal conversations; and for the goals you set in your inaugural address: patriotism, unity, safety, education, and prosperity," he wrote, addressing the president directly.
"The Department of Justice pursues those goals while operating in accordance with the rule of law. The rule of law is the foundation of America. It secures our freedom, allows our citizens to flourish, and enables our nation to serve as a model of liberty and justice for all."
He goes on to say that "truth is not determined by opinion polls".
"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."
In his conclusion, he echoes one of Mr Trump's campaign slogans: "We keep the faith, we follow the rules, and we always put America first."
The White House said Mr Trump had already nominated Deputy Transportation Secretary Jeffrey Rosen to replace Mr Rosenstein.
© 2017 - All Rights with The Financial Express