President Donald Trump announced Thursday night that Joseph Maguire, the leader of the National Counterterrorism Center, is his new pick to be the acting director of national intelligence. “I am pleased to inform you that the Honorable Joseph Maguire, current Director of the National Counterterrorism Center, will be named Acting Director of National Intelligence, effective August 15th,” Trump tweeted. The announcement came not long after Trump tweeted that Sue Gordon, the country’s number two intelligence official and an intelligence veteran of more than 30 years, would resign. White House officials had been signaling such a move for days, saying Trump would prefer to have a political loyalist in the role. Under normal protocol, Gordon would have become acting director after outgoing Director of National Intelligence Dan Coats resigned. But administration officials told CNN that the White House was reviewing whether it could legally choose an acting director outside the line of succession. And two sources told CNN that Gordon was not viewed by some in the administration as the type of political loyalist Trump wanted in the role. Maguire will take over for Coats, whose last day with the administration is on August 15. In a statement Thursday, Coats praised both Gordon and Maguire. “It has been a privilege serving with Sue Gordon to lead the ODNI and 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,” Coats said. “I have had the pleasure of working with NCTC Director Joseph Maguire as part of my leadership team at ODNI, 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.” Gordon’s abrupt departure, with only one week’s notice, and Trump’s longstanding hostility toward the intelligence community – which he has publicly derided, likened to Nazis and disagreed with – is likely to heighten concerns that the President may be trying to politicize agencies that are meant to stand apart from partisanship or politicking. House Intelligence Committee Chairman Adam Schiff, a California Democrat, said the retirements of Coats and Gordon “represent a devastating loss to the Intelligence Community and the men and women who serve in it.” “These losses of leadership, coupled with a President determined to weed out anyone who may dare disagree, represent one of the most challenging moments for the Intelligence Community,” Schiff said in a statement. “It will be up to the Congress to ensure that the Intelligence Community continues to provide independent analysis and judgement to policy makers, and always speak truth to power.” Intelligence professionals emphasize the need to keep politics out of their work in order to offer policy makers the clearest assessment they can of threats and opportunities. The next leaders of the intelligence community will deal with a particularly thorny and dangerous set of challenges, as Trump has escalated tensions with Iran, his trade war with China intensifies, he is considering a third summit with North Korea’s Kim Jong Un, who continues to test missiles, and the US-backed movement to oust Venezuela’s leaders is faltering. Gordon’s resignation letter seemed to indicate that retirement hadn’t been her choice, and that Trump had asked her to step down. “As you ask a new leadership team to take the helm, I will resign my position effective 15 August 2019,” Gordon wrote. “Know that our people are our strength, and they will never fail you or the Nation.” Later, the White House released a handwritten note from Gordon that made it clear she was not leaving of her own accord. “I offer this letter as an act of respect & patriotism, not preference. You should have your team,” she wrote in the note to Trump. Trump has made clear his desire to bring to heel US intelligence agencies, which have produced evidence he disagrees with on Iran, North Korea, Russia’s interference in US elections and other issues. When discussing his attempt to replace Coats with Texas Republican Rep. John Ratcliffe on July 30, the President told reporters that intelligence community needed “somebody like that that’s strong and can really rein it in. As you’ve all learned, the intelligence agencies have run amok. They’ve run amok.” And it was clear members of the President’s inner circle saw the acting director position in political terms as well. Donald Trump Jr. tweeted about Gordon on August 2, referring to former CIA Director and Trump critic John Brennan, and saying that “if Adam Schiff wants her in there, the rumors about her being besties with Brennan and the rest of the clown cadre must be 100% true.” CNN legal analyst and law professor Stephen Vladeck noted on Twitter, that Gordon’s resignation cleared “the way for @realDonaldTrump to name as Acting DNI _any_ current Senate-confirmed Executive Branch officer, or a range of other senior officials currently serving in the Office of the Director of National Intelligence.” Former CIA and National Security Agency Director Michael Hayden told CNN that it’s “awful” that Gordon resigned. “She is a professional. CIA. (National Geospace-Intelligence Agency),” Hayden said. “She rose through the ranks at CIA to become deputy director of support, which is the largest directorate. Coats is a good man but she kept the trains running on time. Trump doesn’t understand what it is to be a professional intelligence officer.” Leaders in both parties had expressed confidence in Gordon, with many advocating for her to get the top job. Her departure is likely to unsettle lawmakers eager for stability in the aftermath of Coats’ resignation and the fallout after Trump’s chosen successor, Ratcliffe, fell by the wayside after scathing criticism. “Sue Gordon’s retirement is a significant loss for our Intelligence Community,” said Sen. Richard Burr, the North Carolina Republican who chairs the Senate Intelligence Committee. “In more than three decades of public service, Sue earned the respect and admiration of her colleagues with her patriotism and vision. She has been a stalwart partner to the Senate Intelligence Committee, and I will miss her candor and deep knowledge of the issues. I look forward to seeing what new challenges she will tackle next.” Burr had said earlier that he’d be “shocked” if Gordon weren’t selected as acting director. “The White House certainly has that ability, but she’s more than capable of handling that job,” he said. “I would be shocked, because that’s what principal deputies are in place for.” Sen. Mark Warner, the vice chair of the Senate intelligence committee, called Gordon “a patriot and a consummate professional.” He said, “her retirement is a great loss not only to the intelligence community, but to the country.” And he took aim at Trump. “President Trump has repeatedly demonstrated that he is seemingly incapable of hearing facts that contradict his own views,” 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.” Trump acknowledged Gordon’s career in his Thursday tweet. “Sue Gordon is a great professional with a long and distinguished career,” Trump wrote. “I have gotten to know Sue over the past 2 years and have developed great respect for her. Sue has announced she will be leaving on August 15, which coincides with the retirement of Dan Coats. A new Acting Director of National Intelligence will be named shortly.” Trump tweeted that Maguire, who will take her place, “has a long and distinguished career in the military, retiring from the U.S. Navy in 2010. He commanded at every level, including the Naval Special Warfare Command. He has also served as a National Security Fellow at Harvard University. I have no doubt he will do a great job!” Trump’s apparent distrust of the intelligence community can be traced back to the 2016 presidential campaign when he first cast doubt on Russia’s efforts to interfere in US elections despite stark warnings from top national security officials. Since taking office, Trump has repeatedly clashed with intelligence officials, including Coats, over their public comments acknowledging Russia not only interfered in 2016, but also poses a threat to future elections – an assessment that was reaffirmed by special counsel Robert Mueller’s investigation, which the President has characterized as a “political witch hunt.” Trump has publicly disagreed with his own intelligence officials on a myriad of other issues including North Korea’s nuclear ambitions, the threat posed by the Islamic State, the situation in Afghanistan, whether the Saudi crown prince ordered the murder of journalist Jamal Khashoggi, and whether Iran was in violation of the 2015 nuclear deal signed by President Obama. This story has been updated.