WASHINGTON -- President Donald Trump has chosen as his national security adviser a soldier-scholar who fought in both Iraq wars and published an influential book that called out the U.S. government for “lies” that led to the Vietnam War.

Army Lt. Gen. H.R. McMaster would remain on active military duty while leading the National Security Council, White House officials said Monday. He joined two retired generals - Defense Secretary Jim Mattis and Homeland Security Secretary John Kelly - already in Trump’s inner circle, adding to the impression that the president prefers military men in top roles.

President Trump named U.S. Army Lieutenant General H.R. McMaster (L) as his national security adviser at his Mar-a-Lago resort in Palm Beach, Florida, on February 20, 2017. NICHOLAS KAMM/AFP/Getty Images

Trump called McMaster “a man of tremendous talent and tremendous experience” when he introduced his new national security adviser at his private Florida club. McMaster, who returned to Washington with the president, said he looked forward to “doing everything that I can to advance and protect the interests of the American people.”

Get Breaking News Delivered to Your Inbox

McMaster replaced retired Gen. Michael Flynn, who was fired last week after Trump determined that Flynn had misled Vice President Mike Pence about the nature of his discussion with Russia’s ambassador to the U.S. during the presidential transition. The White House said McMaster was one of four candidates Trump interviewed for the job over the weekend.

McMaster has been heavily involved in the Army’s efforts to shape its future force and its way of preparing for war. He is the director of the Army Capabilities Integration Center, a sort of military think tank, at Fort Eustis, Virginia.

McMaster commanded troops in both American wars in Iraq - in 1991, when he fought in a storied tank battle known as the Battle of 73 Easting, and again in 2005-2006 in one of the most violent periods of the insurgency that developed after the U.S.-led invasion in 2003. He is credited with using innovative approaches to countering the insurgency in the northern Iraqi city of Tal Afar when he commanded the 3rd Armored Cavalry Regiment. He later served as a special adviser to the top U.S. commander in Iraq.

McMaster, born in 1962, earned a doctoral degree in history from the University of North Carolina. Outside the Army, he may be best known for his 1997 book, “Dereliction of Duty: Lyndon Johnson, Robert McNamara, the Joint Chiefs of Staff, and the Lies that Led to Vietnam,” a searing indictment of the U.S. government’s mishandling of the Vietnam War. The book earned him a reputation for being willing to speak truth to power.

How closely McMaster’s and Trump’s views align were not clear. On Russia, McMaster appears to hold a much dimmer view than Trump of Moscow’s military and political objectives in Europe.

In remarks at the Center for Strategic and International Studies in May 2016, McMaster said Russia managed to annex Crimea and intervene militarily in eastern Ukraine “at zero cost” from the international community.

McMaster said Moscow’s broader goal is to “collapse the post-Cold War security, economic and political order in Europe and replace that order with something that is more sympathetic to Russian interests.”

In his current role, McMaster has studied the way Russia developed and executed its campaigns in Crimea and Ukraine, where it used what some call “hybrid warfare” - part political, part disinformation, part military.

The National Security Council has not adjusted smoothly to Trump’s leadership. The president has suggested he does not trust holdovers from the Obama administration and complained about leaks to reporters. His decision to put his top political adviser on the council’s senior committee drew sharp criticism. On Friday, the head of the council’s Western Hemisphere division was fired after he criticized Trump’s policies and his inner circle of advisers.

Trump said retired Army Lt. Gen. Keith Kellogg, who had been his acting adviser, would serve as the National Security Council chief of staff. He also said he would be asking John Bolton, a former U.S. ambassador to the United Nations, to work with them in a “somewhat different capacity.”