WASHINGTON — Officials with the Trump administration abruptly replaced the acting head of the National Counterterrorism Center this week amid planned cutbacks by the acting director of national intelligence, Richard Grenell, that have prompted fears among career officials of potential political retribution and a widespread loss of expertise.

The acting head of the counterterrorism center, Russ Travers, will step down from his position in the coming weeks and retire, said Amanda Schoch, the top spokeswoman for the Office of the Director of National Intelligence.

Mr. Grenell offered Mr. Travers another senior government position, but he chose instead to retire, according to people familiar with the matter. He had long been expected to retire but sped up the timing after the White House announced on Wednesday that President Trump would nominate Christopher C. Miller, a former National Security Council aide now working at the Pentagon, for the top counterterrorism job.

Mr. Grenell wanted to assemble “a new team to best support” Mr. Miller after his confirmation, Mr. Travers wrote in a letter to colleagues reviewed by The New York Times. Mr. Travers noted that while he would vacate the acting director job in a couple of weeks, he would remain at the counterterrorism center as he prepared for retirement.