President Trump said in a tweet Thursday that he will name Joseph Maguire, the director of the National Counterterrorism Center, as the acting director of national intelligence, following his aborted effort to install a political loyalist. 

Maguire is a retired Navy admiral not steeped in the inner workings of the intelligence community, but his appointment was seen as steadying in the middle of a tumultuous shake-up in the top ranks of the country’s spy agencies.   

As Trump announced ­Maguire’s appointment, he also said that Sue Gordon, the deputy director of national intelligence, would resign and not serve in the acting role when director Daniel Coats also departs next week.

Democratic and Republican lawmakers had said they wanted Gordon, a career intelligence official, to fill in for Coats. But Trump was reluctant to keep someone with whom he had never formed a close bond. The president and his aides also regarded her as a career official and consequently suspicious, according to officials with knowledge of the president’s views. 

President Trump on Aug. 9 said he was in “no rush” to find a permanent director of national intelligence. (The Washington Post)

In a handwritten letter to Trump reviewed by The Washington Post, Gordon wrote that she had offered her resignation “as an act of respect & patriotism, not preference. You should have your team.” 

A U.S. official said that Gordon was “heartbroken” and agonized over her decision to step down, but that she recognized she served at the president’s pleasure. 

“No one ever doubted her commitment to the officers who make up the intelligence community,” said the official, who spoke on the condition of anonymity to discuss internal deliberations. 

Maguire, 67, will assume the role Aug. 15, when Gordon leaves her position.

“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,” Trump said in a tweet. 

Trump had intended to nominate Rep. John Ratcliffe (R-Tex.) as the director of national intelligence. But Ratcliffe’s potential nomination collapsed amid bipartisan criticism about his lack of national security expertise and allegations that he padded his résumé as a former federal prosecutor. 

In her letter of resignation, Gordon emphasized her years of experience and praised intelligence agency employees. 

“I am confident in what the Intelligence Community has accomplished, and what it is poised to do going forward,” Gordon wrote. “I have seen it in action first-hand. Know that our people are our strength, and they will never fail you or the Nation. You are in good hands.” 

Sen. Richard Burr (R-N.C.), chairman of the Senate Intelligence Committee, praised Gordon, but didn’t signal that he would oppose Maguire as the acting director. 

“Sue Gordon’s retirement is a significant loss for our Intelligence Community,” the senator said in a statement. “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.”

Current and former intelligence officials were relieved by Maguire’s appointment, although it wasn’t clear whether Trump would formally nominate him as the permanent intelligence director. Maguire was already confirmed by the Senate for his current position and by law is allowed to assume the duties as acting director. 

“He’s not a career intelligence officer, but he does understand the role that the men and women of the intelligence community play and will represent them well,” said one former senior intelligence official who spoke on the condition of anonymity to be candid.

Maguire, who was a Seal Team 6 commander, has extensive experience in counterterrorism operations and national security, said Mike McConnell, a former director of national intelligence who worked with Maguire during the George W. Bush administration.

“He listens, he’s deliberate and he makes good decisions. He’s the kind of guy that all the troops want to have as boss and would follow him anywhere,” McConnell said.

“Joe is a terrific leader who cares deeply about the men and women of the intelligence community,” said Nick Rasmussen, who held Maguire’s job at the counterterrorism center under Bush and President Barack Obama. “He’s someone who has always accepted the call to serve his country in whatever way is required. This is no different.”

Congressional Democrats said Trump has pushed out Gordon as part of a plan to bring the intelligence agencies to heel. 

“President Trump has repeatedly demonstrated that he is seemingly incapable of hearing facts that contradict his own views,” Sen. Mark R. Warner (D-Va.), the vice chairman of the Senate Intelligence Committee, 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,” Warner said. 

“The retirements of Dan Coats and Sue Gordon represent a devastating loss to the Intelligence Community, and the men and women who serve in it,” Rep. Adam B. Schiff (D-Calif.), the chairman of the House Intelligence Committee, said in a statement. 

“Gordon brought decades of experience and encyclopedic knowledge of the agencies to bear, and her absence will leave a great void. 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.”

Greg Miller contributed to this report.