President Donald Trump on Monday selected Army Lt. Gen. H.R. McMaster to be his national security adviser.

McMaster, an active service member, will replace retired Lt. Gen Michael Flynn. Flynn resigned last week after confirmation he’d spoken about U.S. sanctions against Russia with that country’s ambassador ahead of Trump’s inauguration.

Trump announced McMaster’s selection at Mar-A-Lago, his Florida resort, with McMaster and Keith Kellogg, the National Security Council chief of staff.

“He’s a man of tremendous talent and tremendous experience,” Trump said of McMaster. “I watched and read a lot over the last two days. He is highly respected by everybody in the military and we’re very honored to have him.”

In brief remarks to reporters, McMaster thanked Trump for the opportunity, and said he “looks forward to joining the national security team and doing everything I can to advance and protect the interests of the American people.”

Kellogg said he felt “very honored and privileged to serve along alongside H.R. McMaster. I’ve known him for years, and he’s a great statesman and a great soldier.”

“This is a great team, and we are very, very honored, and our country is lucky to have two people like this,” Trump said of Kellogg and McMaster. “And frankly, after having met so many people in the military, we are lucky to have all of them.”

As soon as they finished their remarks, Trump and the two men departed for Washington.

The appointment of McMaster ends a weeklong search for Flynn’s replacement that was complicated by reports of power struggles and staffing problems within the president’s National Security Council. At least one candidate for the job, retired Vice Admiral Robert Harward, reportedly declined it in part because he was concerned he would not be given full control over staffing decisions.

Trump’s chief of staff, Reince Priebus, made the Sunday talk show rounds stressing that any national security adviser would be given absolute control over staff.

Initial reactions to Trump’s choice of McMaster were largely positive, with former administration officials and members of Congress praising his intellect and temperament.

Democratic Rep. Steve Israel (N.Y.) called McMaster “brilliant.”

I worked w/ Gen.McMaster on how we educate our troops. He's a brilliant,reasoned leader who understands both hard & soft power. Good pick! — (((Steve Israel))) (@RepSteveIsrael) February 20, 2017

Former Obama administration diplomat Jared Cohen was equally approving.

HR McMaster as National Security Advisor is a fantastic appointment. He is a brilliant strategist and thinker. — Jared Cohen (@JaredCohen) February 20, 2017

Paige Lavender contributed reporting.