The acting director of the National Counterterrorism Center was removed Wednesday in what insiders fear is a purge by the Trump administration of career professionals at an organization set up after 9/11 to protect the nation from further attacks, according to two former U.S. officials.

Russell E. Travers, a highly regarded intelligence professional with more than 40 years of government service, told colleagues he was fired by acting director of national intelligence Richard Grenell, said the former officials, who like others interviewed spoke on the condition of anonymity to discuss a sensitive matter.

Travers, who took up the acting position last August, had been resistant to pressure to make personnel cuts at the center, which has been undergoing a review of its mission and effectiveness.

Also removed at the NCTC was Travers’s acting deputy, Peter W. Hall, who is returning to the National Security Agency, the former officials said.

The surprise move came hours after President Trump announced his intent to nominate Pentagon Special Operations and counterterrorism official Christopher Miller to head the center. A deputy director will be named to serve as acting director pending Miller’s confirmation, said a spokesman for the Office of the Director of National Intelligence.

A spokeswoman for Grenell disputed that Travers was fired.

Travers “was offered the opportunity to move to a new role and chose to retire,” Assistant Director of National Intelligence for Strategic Communications Amanda Schoch said in a statement to The Washington Post. “Russ told Acting Director Grenell he wanted to retire and that he did not want another assignment.”

Said Schoch: “We are grateful for Acting Director Russ Travers’ many years of service to the American people. . . . Over the next few weeks we expect Russ to step out of his current position to prepare for retirement. . . . Russ’ willingness to step up and serve as the acting director of NCTC multiple times is an example of his commitment to serve this vital mission. He has given NCTC many years of great service.”

The removals have shocked Travers’s colleagues, who are upset at the treatment of someone so well-regarded, according to the two former officials.

One of the former officials said that Travers walked into a meeting on Wednesday expecting to brief Grenell on the center when he was told that he was out. He had no intention or desire to retire, they said.

In the meeting, Grenell told Travers he would like to know “how long it would take you to leave,” according to one of the former officials, who was briefed on the meeting. Travers replied that he would need “a few weeks” to complete the administrative work, the official recounted.

“They said, ‘Great, we’ll afford you the opportunity to retire,’ ” the former official said.

In a farewell note to the workforce Wednesday, Travers noted Trump’s plan to bring on Miller, lauded Miller’s experience and said the acting DNI wanted to “assemble a new team.” He sought to boost morale, noting the center’s accomplishments. “We have recently been the subject of an external evaluation by a group of national security luminaries that strongly validated the need for the center,” he wrote. “And most importantly, we have you — the finest workforce with whom I have ever been associated. I have no doubt that the center is postured for success going forward.”

As the threat from al-Qaeda and the Islamic State has diminished in recent years, intelligence community officials have been debating whether the NCTC, which is the largest component of the ODNI, needs to be as large as it is. The NCTC has about 1,000 personnel, about 300 of whom are contractors and several hundred of whom are on loan from other agencies, including the CIA.

Travers, who began his career as a U.S. Army intelligence officer in 1978, took up the acting position last August when the center’s then-director, Joseph Maguire, was tapped to become the acting DNI. Maguire was fired by Trump last month amid a controversy over a briefing given to lawmakers by a subordinate on Russian threats to the 2020 election.

The president then named Grenell, a staunch loyalist, to serve as the acting DNI until a permanent director has been confirmed.

Grenell and senior adviser Kashyap Patel, also installed last month, are seeking ways to reduce the overall size of the ODNI, according to one former intelligence official. The NCTC is seen as a rich target, and the career officials who have pressed for cuts in the past see an opening, said the former official.

“They see an opportunity now to give the politicals the scalps they want while achieving changes they’ve long sought at the same time,” the former official said.

Grenell and the ODNI leadership “have been discussing the many reform recommendations previously made by former directors,” Schoch said in her statement. “Our hope is that these reforms will posture NCTC to lead the counterterrorism mission into the future.”

The center grew out of a recommendation by the National Commission on Terrorist Attacks Upon the United States, or the 9/11 Commission. The 2004 Intelligence Reform and Terrorism Prevention Act established the NCTC and placed it under the DNI.

The center exists to ensure that information from any source about potential terrorist attacks against the United States is available to analysts. It operates a master database from which the country’s terrorism watch list is drawn, and it writes assessments for policymakers.

Some intelligence officers see the NCTC as less effective than the CIA’s counterterrorism center and also view the center as absorbing resources that would be better placed at operational agencies.

“There’s not a lot of love for NCTC at the CIA, given the professionals in CIA’s own counterterrorism mission center have the operational and analytic expertise in this area,” said Marc Polymeropoulos, a former CIA counterterrorism official, who said he does not see the NCTC shake-up as an attack on the intelligence community, but rather a natural downsizing that was long overdue.

Yet one of the center’s strengths, officials say, is its ability to integrate information from domestic and foreign intelligence sources without running afoul of privacy laws.

Sending CIA and other analysts back to their home agencies may reduce the center’s numbers, but “you can’t take all those NCTC authorities and put them back at the CIA,” said one of the former officials. “We don’t send domestic information to a foreign intelligence agency. That’s the system we have to protect against abuse of surveillance authorities.”

Shane Harris contributed to this report.