WASHINGTON — The top U.S. counterterrorism official is leaving the federal government at the end of the year, National Intelligence Director Dan Coats said Wednesday.

Nick Rasmussen, who has directed the National Counterterrorism Center for the past three years and was deputy director for more than two years before that, is leaving despite a request by President Donald Trump’s administration for him to stay.

“Nick is deeply committed to the counterterrorism mission and has skillfully guided the nation through an evolving and complex terrorism threat environment,” Coats said. “The Trump administration’s request for Nick to remain as NCTC director is a testament to his outstanding tenure.”

Coats also thanked Rasmussen for his 27 years of government service, which included senior roles at the State Department and the White House.

Russ Travers, the deputy director of the counterterrorism center, will be acting chief until Trump nominates a successor.