(CNN) National security adviser H.R. McMaster has agreed to resign and will be replaced by former US ambassador and Fox News analyst John Bolton, President Donald Trump announced in a tweet on Thursday.

Here is the letter McMaster sent to the National Security Council announcing his departure:

After thirty-four years of service to our nation, I am requesting retirement from the U.S. Army effective this summer after which I will leave public service. Throughout my career it has been my greatest privilege to serve alongside extraordinary service members and dedicated civilians.

I am thankful to President Donald J. Trump for the opportunity to serve him and our nation as national security advisor. I am grateful for the friendship and support of the members of the National Security Council who worked together to provide the President with the best options to protect and advance our national interests.

I am especially proud to have served alongside the men and women of the National Security Council Staff who established a strong foundation for protecting the American people, promoting American prosperity, achieving peace through strength, and advancing American influence. I know that these patriots will continue to serve our President and our nation with distinction.

Read More