Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Retired Army Col. Derek Harvey, a longtime intelligence analyst who had been close to former National Security Advisor Michael Flynn, has been fired from his job on the National Security Council — the latest twist of intrigue in a White House beset by competing power centers.

National Security Adviser H. R. McMaster "removed" Harvey, NSC spokesman Michael Anton told NBC News.

"General McMaster greatly appreciates Derek Harvey's service to his country as a career Army officer, where he served his country bravely in the field and played a crucial role in the successful surge in Iraq, and also for his service on Capitol Hill and in the Trump administration," Anton said in a statement. "The administration is working with Colonel Harvey to identify positions in which his background and expertise can be best utilized."

Related: Trump Says Iran Complying With Nuclear Deal But Dangerous Threat

In a statement, Harvey said, "I will be leaving the National Security Council today to take advantage of a new opportunity to continue serving our President and the United States of America in an important capacity."

Ret. Army Col. Derek Harvey speaks about ISIS during a Senate Armed Services Committee hearing on Capitol Hill May 21, 2015. Mark Wilson / Getty Images file

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

He did not elaborate on his new role, but he portrayed the change as his decision, adding that "I look forward to shouldering greater responsibilities in support of the President."

Harvey, a former Defense Intelligence Agency analyst with long experience in the Middle East, had been brought in by Flynn, who was fired as national security advisor a month after Trump took office. He is also close to Gen. David Petraeus, who is said to be advising the Trump administration from the sidelines.

McMaster has sought to push out some Flynn loyalists from the NSC. He unsuccessfully tried to fire Ezra Cohen-Watnick, the senior director for intelligence coordination, but Trump personally saved Cohen-Watnick's job, officials have said.

No reason was given for Harvey's removal.

"Derek Harvey is one of the finest intel analysts that I've ever encountered, so I'm befuddled as to why he is being removed," said retired Army Gen. Jack Keane. Keane was an adviser to former President George W. Bush who told NPR that he turned down an offer to become defense secretary for Trump.

Harvey has been credited with understanding the insurgency in Iraq far ahead of most of his compatriots during the Bush administration, and also with understanding the threat from al Qaeda before 9/11.

He is a hard-liner on Iran, and he was appointed recently to a White House working group examining whether Iran is complying with the nuclear deal, a task that is officially the responsibility of the State Department.

Some former Obama administration officials and State Department officials view the White House effort as undermining objective intelligence analysis, and they fear it harkens back to the Bush administration's efforts to pressure the intelligence community about alleged weapons of mass destruction in Iraq before the 2003 invasion.

Related: Trump Administration Orders Review of Iran Nuclear Deal Sanctions

It has also been reported that Harvey grew close to White House chief strategist Steve Bannon.

"I treasure having had the opportunity to support committed and visionary leaders such as Mrs. K.T. McFarland, Mr. Jared Kushner, and Mr. Steve Bannon, and consummate professionals like Mr. Jason Greenblatt and Ms. Dina Powell," Harvey said in his statement.