A graduate of the US Military Academy at West Point, McMaster commanded troops during the first Gulf War, receiving the Silver Star for his role commanding a tank during the Battle of 73 Easting, one of the biggest tank battles since World War II.

McMaster is also known for his intellectual pursuits, receiving a PhD in history from the University of North Carolina. In 1997 he also wrote a book taking the military to task for aspects of its public posture during the Vietnam War.

"I'd just like to say what a privilege it is to be able to continue serving our nation," McMaster said while appearing alongside Trump. "I'm grateful to you for that opportunity. And I look forward to joining the national security team and doing everything I can to advance and protect the interests of the American people."

Trump was also flanked by the acting national security adviser, retired Lt. Gen. Keith Kellogg. Kellogg, a decorated Vietnam veteran and campaign adviser to Trump, will return to his duties as chief of staff of the National Security Council.

McMaster, currently serving as the director of the Army's Capabilities Integration Center, is the first active-duty military officer to take the post since Gen. Colin Powell served in the role during the final years of the Reagan administration. As an active-duty service member, McMaster would likely have had difficulty turning down a job the commander in chief had asked him to fill.

His book, "Dereliction of Duty," examined the military's failure to communicate to US policymakers that America's Vietnam War strategy was not working.

Retired Col. Cedric Leighton called the book "one of the great works to come out of military thinkers in the last two decades."

"He talked about, in essence, the military's responsibility to talk to civilian leaders, to challenge the status quo, and I think that's what we need in the White House," Rep. Adam Kinzinger, an Illinois Republican and veteran of Iraq and Afghanistan, told CNN's Jim Sciutto. "I think it's a great pick."

McMaster redeployed to Iraq following the 2003 invasion, receiving praise for his command of US troops during efforts to secure Tal Afar from insurgents.

He was key in the development of the military's counterinsurgency doctrine under Gen. David Petraeus, serving as his special assistant while Petraeus commanded US troops in Iraq from 2007 to 2008. Some of the counterinsurgency tactics he pioneered formed the backbone of the 2007 "surge" of additional American forces for the Iraq war effort, stabilizing the country and tamping down increasing violence.

He also deployed to Afghanistan in 2010 and oversaw military planning and anti-corruption efforts.

McMaster was named to Time Magazine's list of the 100 most influential people in 2014.

"McMaster might be the 21st century Army's pre-eminent warrior-thinker," Ret. Lt. Gen. David Barno wrote of McMaster in an accompanying profile.

He went on to call him "the rarest of soldiers -- one who repeatedly bucked the system and survived to join its senior ranks."

"I watched senior Army generals argue over ways to end his career," Barno added. "But he dodged those bullets."

While praised publicly by many of his military colleagues, McMaster has a reputation for speaking his mind within military ranks, causing some to wonder if that's why he wasn't promoted more rapidly.

Some believe his advancement was met with some resistance in part because of his willingness to write publicly about military strategy and having such a high public profile while serving, something not necessarily encouraged within the ranks.

But Sen. John McCain, the Republican chairman of the Armed Services Committee and sometimes-Trump critic, offered a quick endorsement of his selection, calling him "an outstanding choice for national security adviser."

"I have had the honor of knowing him for many years, and he is a man of genuine intellect, character and ability. He knows how to succeed," McCain said in a statement, adding, "I give President Trump great credit for this decision."

Leighton told CNN: "I do wonder if the President thought that this was somebody who could shake things up, but shake things up in a way where the institutions would survive so they would become more effective."