It was one year ago that Donald Trump signaled he might just fire all the generals who he said were failing to defeat the Islamic State under the leadership of President Barack Obama.

"Well, they'll probably be different generals, to be honest with you," then-candidate Trump told NBC's Matt Lauer aboard the carrier Intrepid in New York on Sept. 7, when asked about his plan to order the Pentagon to present him, within 30 days of his inauguration, a plan to swiftly defeat ISIS.

As of this writing, all the top generals and admirals serving then are serving now, and Trump has added a few retired military men to his inner circle as well. The only general fired was the one Trump brought with him to the White House, retired Lt. Gen. Michael Flynn, who lasted just 23 days as national security adviser.

Trump not only didn't fire any of the four-stars he disparaged as having been "reduced to rubble," and "embarrassing our country," under Obama, he has in his first year in office gradually, often grudgingly, embraced them and begun to follow their advice.

"It's an unexpected, unorthodox, and altogether excellent situation," said Michael O'Hanlon, a senior fellow at the Brookings Institution. "For all his peculiarities, Mr. Trump does seem to like and respect these generals, and he knows how to pick them — he found among the very best of this generation of American military leaders."

O'Hanlon argues that Trump's generals, as students of history and strategy, are "seasoned in the dangers of war as well as the limitations of the military instrument of foreign policy."

But Lawrence Korb, a former assistant secretary of defense under President Reagan, argues that by having so many generals among his closest advisers, Trump may be getting "too narrow a perspective" on complex foreign policy issues.

"For example, Afghanistan. Military people don't want to lose a war," said Korb, who is now with the left-leaning Center for American Progress. "With Afghanistan, they pushed him in a direction and there was nobody really to counterbalance that."

Trump's evolving relationship with generals started small. Retired Gen. Jim Mattis, the legendary Marine commander who Trump couldn't stop calling "Mad Dog," even though Mattis disliked the moniker, convinced Trump in their first meeting that waterboarding was torture, and that torture doesn't work.

"I was surprised. He said, 'I've never found it to be useful,' " Trump recounted to The New York Times, a few weeks after his election in November. "He said, 'I've always found, give me a pack of cigarettes and a couple of beers and I do better with that than I do with torture.'"

And just like that, the president-elect, who campaigned on the pledge to bring back "a hell of a lot worse than waterboarding," changed his mind.

It's hardly a straight line from that November day in 2016 to last month, when in a carefully-crafted teleprompter speech, the president admitted he was overruling his gut, and going with the generals on one of his most important foreign policy decisions, whether to stick with a retooled version of Obama's strategy for Afghanistan.

"My original instinct was to pull out. And historically, I like following my instincts," Trump said. But after meeting with what he called "my generals," he went with a plan advocated by his top commander in Afghanistan, Gen. John Nicholson, a man whom Trump had contemplated firing a month earlier.

The Afghanistan strategy was finalized on a Friday. There were no hints in Trump's tweets, and there were no leaks before the president addressed the nation in a primetime television address, reading carefully scripted remarks.

It was the teleprompter Trump the media loves to praise as more presidential, and a high-water mark in the effort of retired Marine Gen. John Kelly, Trump's newly installed chief of staff, to impose some good order and discipline on a White House that was perceived as unruly and out of control.

The speech was panned by one unabashed Trump supporter, Sebastian Gorka, the firebrand deputy Kelly had pushed out the previous Friday.

In his resignation letter, Gorka seethed at the forces who now had the president's ear.

"The fact that those who drafted and approved the speech removed any mention of ‘radical Islam' or ‘radical Islamic terrorism' proves that a crucial element of your presidential campaign has been lost," Gorka wrote.

Besides Mattis and Kelly, who are both retired Marine four-stars, the generals who are close to Trump also include two still in uniform, Gen. Joseph Dunford, chairman of the Joint Chiefs, and Lt. Gen H.R. McMaster, who replaced Flynn and is most famous for writing a doctoral dissertation that turned into a best-selling book on the failure of Vietnam-era generals to speak truth to power.

Much has been written about why so many generals, who have spent long careers being apolitical, are serving in such a highly politicized White House.

Most armchair theories center on the notion that the generals feel a duty to serve as a bulwark against an impetuous and impulsive commander in chief.

Mattis easily won approval for a rare waiver to the law which bars recently retired officers from running the Pentagon because, as Democratic Sen. Jack Reed put it at his confirmation hearing, he was seen as "the saucer that cools the coffee."

Trump, who famously bragged during the campaign that he knew more about ISIS than the generals, ended up taking all their advice, from delegating more authority to commanders in the field, to bombing a Syrian air field as punishment for Bashar Assad's use of chemical weapons.

They talked Trump out of firing Nicholson, and into first removing Steve Bannon from the National Security Council, and then from the White House entirely.

It's been a slow, inexorable, internecine campaign of attrition, in which the former military men fly as low under the radar as possible, while gradually working to try to disabuse the president of views that they see as counter to U.S. national interests, and to disassociate him from staff members who hold radical views.

After six months as Homeland Security secretary, Kelly was tapped by Trump to replace Reince Priebus. Kelly immediately asserted his authority, beginning a purge of Trump loyalists he saw as reckless or incompetent, starting with Ezra Cohen-Watnick, an ally of Trump son-in-law Jared Kushner and staff member on the National Security Council, continuing with the bombastic Anthony Scaramucci, and finally Bannon and Gorka.

Bannon's favored Afghanistan option — replacing U.S. military trainers with private contractors — was scrapped after his departure, facing as it did uniform resistance from all of Trump's generals, including Pentagon chief Mattis.

Now, Mattis faces another thorny issue not of his making. As a battlefield commander, Mattis said he never cared much about "two consenting adults and who they go to bed with," as long as they can fight.

But after quietly working to kill congressional effort to strip funding for medical treatment for transgender troops, Mattis woke up one morning on vacation to see Trump had tweeted out a total ban on transgender people serving in any capacity in the military.

The president said he was acting once again on the advice of "my generals," but at the Pentagon no one could produce a single general or admiral who had recommended, or even been consulted on, the controversial and possibly illegal move.

The generals are used to Trump's impromptu policy statements, such as the time he pronounced that the Navy's new class of aircraft carriers would be returning to old-fashioned steam catapults, after hearing about some problems with the new electromagnetic system.

In that case, the Navy just ignored Trump's tirade, and the issue went away.

In the case of the transgender ban, Mattis was able to work the issues with help inside the White House so when the guidance came back to the Pentagon it was vague and gave him some wiggle room.

Instead of an order to immediately discharge transgender troops, an option advocated by the now-departed Gorka, Mattis has six months to convene a panel of experts and then make a recommendation to the president.

Trump may again go with his gut, or he may be worn down by his generals by next spring, perhaps convinced that the transgender fight is not worth the aggravation, especially when there are bigger problems to tackle, such as North Korea.

Trump is still at odds with his generals on dealing with the bellicose rhetoric and provocative actions of North Korea's Kim Jong Un.

While Trump tweeted that "Talking is not the answer!" Mattis, who happened to be meeting at the Pentagon with Song Young-moo, South Korea's defense minister, responded calmly, "We're never out of diplomatic solutions."

Kelly has reportedly told the White House staff that his job is to manage them, not the president.

But under Kelly the responses to North Korea's missile tests have tended to come from official White House statements, instead of angry early morning tweets.

"We don't know if the new chief of staff Kelly has hidden Trump's BlackBerry or not," said Bruce Klingner of the Heritage Foundation, "but it does seem to be a more reflective traditional response than we have seen to some North Korean provocations."

One senior Pentagon official, who has been in some national security meetings, says Trump seems to rely more on the retired generals, such as Mattis and Kelly for advice.

"He's very much the CEO, he hired these guys to do a job, and he appreciates their wisdom and experience."

On the other hand, he says Dunford, who is still in uniform, tries to stick to what the official called, "straight, no kidding, honest assessments."

Mattis himself disputes the notion that Trump is inflexible.

Speaking to reporters informally last week, Mattis said, "The first time I met with President Trump, we disagreed on three things in my first 40 minutes with him: on NATO, on torture and something else, and he hired me. This is not man who is immune to being persuaded, if he thinks you've got an argument."