The head of the FBI’s Washington Field Office announced Thursday that he is retiring after serving 25 years in the bureau, officials said.

James W. McJunkin, who has served as the assistant director in charge of the District’s field office, is taking a corporate security job in Chicago. He announced his retirement plans in an e-mail he sent to colleagues, FBI officials said.

McJunkin, a 51-year-old former Pennsylvania state trooper, joined the bureau in 1987 and eventually came to specialize in counterterrorism investigations. Before being tapped to lead the Washington Field Office in 2010, he was the FBI’s assistant director of counterterrorism.