The president called McMaster, a career Army officer, “a man of tremendous talent and tremendous experience.”
Trump made the announcement Monday at his Mar-a-Lago Club in Palm Beach, Fla., where he had been interviewing a number of candidates for the job.
His decision comes one week after he dismissed Flynn for misleading Vice President Mike Pence and others about whether he discussed U.S. sanctions with Russia’s ambassador during the transition.
Responding to a shouted question from a reporter, Trump said Pence had a role in making the pick.
Retired Army Lt. Gen. Keith Kellogg, who had been serving as interim national security adviser, will return to his previous role as chief of staff on the National Security Council.
“I think that combination is very, very special,” Trump told reporters while seated between the two men on a sofa in front of a table topped with a bowl of roses underneath a chandelier.
McMaster, 54, is a well-known military strategist who authored a book that criticized U.S. decision-making during the Vietnam War.
He led a cavalry regiment that retook the city of Tal Afar from al-Qaeda insurgents during the Iraq War, an operation that garnered national attention.
The general has been an outspoken proponent of retooling the armed forces to address modern threats such as cyber warfare.
“I’m grateful to you for that opportunity, and I look forward to joining the national security team and doing everything that I can to advance and protect the interests of the American people,” McMaster told Trump.
Trump’s selection of McMaster will please national security Republicans, who long voiced concern about Flynn over his ties to Russia and his numerous clashes with the intelligence community.
Sen. John McCain (R-Ariz.), a frequent Trump critic, called McMaster “an outstanding choice for national security adviser.”
“He is a man of genuine intellect, character and ability. I give President Trump great credit for this decision,” said McCain, the chairman of the Senate Armed Services Committee.
The post of national security adviser is one of the top jobs at the White House; the aide is tasked with coordinating the president’s foreign policy initiatives and military objectives across federal agencies.
Trump was forced to scramble to replace Flynn, but the process was reportedly hampered by tussling between the White House and potential candidates over autonomy on staff selection.
White House officials over the weekend denied those reports, saying the adviser would be able to choose his or her own staff.
Trump’s first pick to replace Flynn, retired Vice Admiral Robert Harward, turned down the job, citing family reasons. Former CIA director and retried four-star Gen. David Petreus also dropped out of consideration. Both reportedly wanted full control over their staffs, but Trump was resistant.
Former Obama national security adviser Susan Rice tweeted her congratulations to McMaster, referencing the reported tensions over staff picks by saying, “Hope you will be able to choose your team, have direct reporting and daily access to POTUS.”
Deputy national security adviser K.T. McFarland told The Hill last week she would remain in her current post at Trump’s request.
The president spoke on Sunday with at least three other candidates for the job, including Kellogg, former United Nations Ambassador John Bolton and West Point superintendent Lt. Col. Robert Caslen.
Trump indicated that Bolton would receive an unspecified post with the administration.
“I have tremendous respect for the people I met with. I know John Bolton, we’ll be asking him to work with us in a somewhat different capacity,” he said.