US President Donald Trump has announced that his respected Deputy Director of National Intelligence was resigning, the latest chapter in a broad reshuffle at the top of the country's spy agencies.
Sue Gordon spent 25 years in the CIA before becoming second-in-command to outgoing Director of National Intelligence Dan Coats and was in line to serve as acting director.
"Sue Gordon is a great professional with a long and distinguished career. I have gotten to know Sue over the past 2 years and have developed great respect for her," Mr Trump said on Twitter.
"Sue has announced she will be leaving on August 15, which coincides with the retirement of Dan Coats," Mr Trump added.
Minutes later Mr Trump tweeted that Joseph Maguire, a retired US Navy vice-admiral and the current Director of the National Counterterrorism Center (NCTC), would replace Ms Gordon.
"I have no doubt he will do a great job!" Mr Trump said.
He praised the 67-year-old's "long and distinguished" military career, during which he served as commanding officer of SEAL Team 2 and led the Naval Special Warfare Center.
But the departure of Ms Gordon, a seasoned, independent-minded senior official, will be seen as a blow to an intelligence community already uneasy about Mr Coats leaving.
Ms Gordon enjoyed support on both sides of the aisle on Capitol Hill, but critics say Mr Trump is suspicious of career officials in an establishment he has long hoped to reshape in his own image.
"I am confident in what the Intelligence Community has accomplished, and what it is poised to do going forward," Ms Gordon wrote in her brief resignation letter addressed to Mr Trump.
"Know that our people are our strength, and they will never fail you or the Nation. You are in good hands," she said.
Richard Burr, the Republican head of the Senate Intelligence Committee, said Ms Gordon had "earned the respect and admiration of her colleagues with her patriotism and vision," while the committee's Democratic vice chairman Mark Warner said her departure was "a real loss" to the community and the country.
"President Trump has repeatedly demonstrated that he is seemingly incapable of hearing facts that contradict his own views," Mr Warner said in a statement.
"The mission of the intelligence community is to speak truth to power. Yet in pushing out two dedicated public servants in as many weeks, once again the president has shown that he has no problem prioritizing his political ego even if it comes at the expense of our national security."
Federal law dictates that if the director of national intelligence leaves, the deputy should serve as acting director.
Mr Trump announced last month he would nominate Republican congressman John Ratcliffe to replace Mr Coats in the permanent role, but Mr Ratcliffe withdrew from consideration last week amid questions over his credentials.
The staunch Trump loyalist received only tepid support from key Republicans, and a backlash from Democrats worried about the politicisation of the intelligence community.
Mr Coats did not see eye-to-eye with Mr Trump on a range of issues while serving as the official who oversees and coordinates the CIA, the National Security Agency and 15 other US intelligence bodies.
"It has been a privilege serving with Sue Gordon to lead... the intelligence community over these past two years. She is a visionary leader who has made an enormous impact on the IC over the more than three decades she has served," Mr Coats said in a statement.
"I have had the pleasure of working with NCTC Director Joseph Maguire as part of my leadership team... and I am pleased that the President has announced that Joe will serve as Acting DNI. Joe has had a long, distinguished career serving the nation and will lead the men and women in the IC with distinction."