Peter Bergen is CNN's national security analyst, a vice president at New America and a professor of practice at Arizona State University. He is the author of " United States of Jihad: Investigating America's Homegrown Terrorists ."

McMaster, 54, is the smartest and most capable military officer of his generation, one who has not only led American victories on the battlefields of the 1991 Gulf War and of the Iraq War, but also holds a Ph.D. in history.

McMaster is, in short, both an accomplished doer and a deep thinker, a combination that should serve him well in the complex job of national security adviser.

McMaster's views

A key to McMaster's thinking is his 1997 book, "Dereliction of Duty: Lyndon Johnson, Robert McNamara, the Joint Chiefs of Staff and the Lies that Led to Vietnam." Published two decades ago when McMaster was only a major, "Dereliction of Duty" caused something of a sensation in the US military because it took US military leaders to task for their dereliction of duty during the Vietnam War.

McMaster painted a devastating picture of the Joint Chiefs, who told President Lyndon Johnson what he wanted to hear about how the Vietnam War was going. He described how they went along with Johnson's ill-considered attempt to find a middle ground between withdrawing from Vietnam and fighting a conventional war there that — divorced from on-the-ground realities -- had no chance of success.

The Joint Chiefs never provided Johnson with useful military advice about what it might take to win the war, according to McMaster.

JUST WATCHED Kinzinger says McMaster will challenge status quo Replay More Videos ... MUST WATCH Kinzinger says McMaster will challenge status quo 04:31

Instead, they accepted Johnson's preference for what the President termed "graduated pressure" against the North Vietnamese. This took the form of a gradually escalating bombing campaign that did not bend the North Vietnamese to American will, and instead confused activity — bombing raids and body counts -- with progress on the battlefield.

The major problem Johnson and his military advisers had, McMaster found, is that they went to war in Vietnam without a strategy. He explained: "The war in Vietnam was not lost in the field, nor was it lost on the front pages of The New York Times or the college campuses. It was lost in Washington, D.C."

After Trump announced McMaster as his national security adviser, "Dereliction of Duty" became an instant best-seller on Amazon

Its lessons will surely be weighing on McMaster's mind now, as Pentagon brass prepare to present to Trump and his national security team within a few days a menu of options for how to fight the war against ISIS in Iraq and Syria.

Another key aspect of McMaster's thinking is that war -- as the Prussian military theorist Carl Von Clausewitz pointed out almost two centuries ago — is a fundamentally political endeavor. In an article that McMaster published in The New York Times four years ago he wrote, "Be skeptical of concepts that divorce war from its political nature, particularly those that promise fast, cheap victory through technology."

McMaster, who I first met in Afghanistan while reporting there in 2010, is fond of quoting Thucydides, who 2½ millennia ago said that wars resulted from "fear, honor and interest."

McMaster believes that not much in the nature of war has changed since. However, in his view the United States has too often believed its technological superiority will prevail on the battlefield when, in fact, it is political and human factors that often blunt American power.

McMaster wrote in his Times article "... in the years preceding our last two wars, thinking about defense undervalued the human as well as the political aspects of war. Although combat operations unseated the Taliban and the Saddam Hussein regime, a poor understanding of the recent histories of the Afghan and Iraqi peoples undermined efforts to consolidate early battlefield gains into lasting security."

This is an important lesson to remember as the United States and its allies continue to increase pressure on ISIS. The Sunni militants that make up ISIS are not the underlying problem in Syria and Iraq, but rather they are a symptom of other deeper problems. McMaster knows that there surely will be a "son of ISIS" and a "grandson of ISIS" if there is not some kind of political solution to the wars in Syria and Iraq that produced ISIS in the first place.

McMaster at war

McMaster has fought in the key American wars of the past 2½ decades. He understands what it is to fight in a classic, state-on-state war, such as the 1991 Gulf War, in which the United States forced the army of Iraqi dictator Saddam Hussein out of Kuwait in only 100 hours.

He has also fought in the messier counterinsurgency wars the United States is still fighting in Iraq and Afghanistan today and that have ground on for 14 and 16 years respectively, with no end in sight.

In the Gulf War then-Capt. McMaster led a US tank troop in the Battle of 73 Easting on February 26 1991. McMaster's armored forces, acting as scouts, suddenly encountered a large force of the Iraqi army. In a 2014 interview with National Geographic Television, McMaster recalled, "I can see the enemy with the naked eye. I mean, they're at very close range."

In a battle that lasted only 23 minutes, McMaster's force destroyed an astonishing 28 Iraqi tanks, 16 personnel carriers and more than 30 trucks.

This battle is often studied by young US military officers as the exemplary case study of high intensity conventional combat.

The lesson that McMaster took away from the Gulf War: "There are two ways to fight the United States military: asymmetrically and stupid. Asymmetrically means you're going to try to avoid our strengths. In the 1991 Gulf War, it's like we called Saddam's army out into the schoolyard and beat up that army."

Almost a decade and a half later McMaster was back in the Middle East. This time he wasn't fighting the orderly tank regiments of Saddam Hussein's conventional army, but instead the guerrilla forces of al Qaeda in Iraq, which had taken over much of western Iraq and were proving to be a far harder nut to crack than Saddam's military.

Al Qaeda had also learned from the Gulf War and wasn't fighting "stupid;" it was fighting "asymmetrically" and not engaging the US military in a conventional war.

McMaster's innovation

In 2005 then-Col. McMaster led the first successful full-scale battle against al Qaeda in the western Iraqi city of Tal Afar, a city of a half-million people.

In his National Geographic interview, McMaster recalled that al Qaeda had turned Tal Afar into a living hell: "All the schools were closed because of violence, all the marketplaces were closed. There was no power. There was no water. The city was lifeless. People lived in abject fear."

McMaster established 29 small outposts in the city. His regiment lived among the Tal Afar population and partnered with tribal elders to offer protection against al Qaeda. The citizens began to trust the Americans and provided them with intelligence on al Qaeda's movements. Within a few months al Qaeda had retreated from Tal Afar.

McMaster's approach was the exact opposite of the US strategy of the time, which was to hand over ever more control to the Iraqi army and withdraw the bulk of American soldiers to massive bases.

Instead of reducing the American footprint, McMaster pursued a strategy in Tal Afar of increasing the US military presence in an effort to tamp down the intensifying Iraqi civil war and undermine al Qaeda. McMaster also implemented classic "clear, hold and build" counterinsurgency operations.

McMaster's Tal Afar campaign is considered by many military experts to be the classic example of counterinsurgency tactics during the Iraq War.

His work there would also become a model for the George W. Bush administration's new military strategy in Iraq.

In October 2005, Bush's Secretary of State Condoleezza Rice in congressional testimony said that, "Our political-military strategy has to be to clear, hold, and build: to clear areas from insurgent control, to hold them securely, and to build durable, national Iraqi institutions."

This approach would also soon be codified in the US military's new counterinsurgency manual, written by Gen. David Petraeus and Gen. James Mattis, who is now the secretary of defense.

McMaster's lesson from the Iraq War: "We didn't adapt fast enough, largely because in the beginning of the war in Iraq we were in denial. We wouldn't even call it an insurgency. We wouldn't call it insurgency because it evoked the images of Vietnam."

Al Qaeda in Iraq would eventually morph into ISIS, which controls the city of Tal Afar today. McMaster knows this ground well, which will help him as the new plans are presented to the President in coming days about how to shape the final phase of the war against ISIS.

After Iraq, McMaster deployed to Afghanistan, where he was tasked by Petraeus to lead an anti-corruption task force.

Again, McMaster's on-the-ground expertise in Afghanistan will be very useful as President Trump considers his options there.

The Taliban now control or contest a third of the Afghan population. That's 10 million people; more than ISIS controlled at the height of its power in summer 2014, when it might have controlled 8 million people at most.

Whether with Afghanistan or the fight against ISIS, McMaster has his work cut out for him, but he is the best man for the job and credit should go to President Trump for making this inspired choice.