ANALYSIS: In reversing position on Afghanistan, Trump gives himself an out

Trump said it was part of an emerging doctrine formed with Cabinet and generals.

His instinct, he told the American people last night, was to pull out of Afghanistan — in keeping with his position for many years as a private citizen and a candidate. It was only after intense meetings and behind-the-scenes wrangling with his "Cabinet and generals," he said, that he landed on a strategy that recommits American forces to the nation's longest-running war.

"Our nation must seek an honorable and enduring outcome worthy of the tremendous sacrifices that have been made, especially the sacrifices of lives," Trump said.

But even in that context, he is leaving himself room to reverse again. By making clear that he's going against his "original instinct," he's left the door open to blame others if this new strategy doesn't meet its goals.

The plan itself is so vague — perhaps, if you believe the White House's take, intentionally so — that it may be impossible to judge its effectiveness. A war that has frustrated presidents, generals and tacticians for 16 years seems destined to linger, and Trump is already trying to limit his culpability for setbacks.

"When I became president, I was given a bad and very complex hand," he said.

In the immediate term, Trump managed to rally the Republican establishment back to his side. After a dismal week of denunciations and a debate over the nature of white supremacists, Trump found himself back in a comfort zone of praise from the party's hawks.

Trump cast his decision as part of his emerging doctrine.

"Principled realism will guide our decisions moving forward," he said, reusing a phrase he debuted during his Middle East trip.

He has demonstrated a mastery of understanding and motivating his base, as evidenced by the fact that 28 percent of Americans approved of his response to the recent violence in Charlottesville, Virginia, according to a new ABC News/Washington Post poll.

And he seemed to have far more than Afghanistan on his mind last night, in a speech that seemed more about Virginia than about South Asia at times.

"We cannot remain a force for peace in the world if we are not at peace with each other," Trump said. "As we send our bravest to defeat our enemies overseas — and we will always win — let us find the courage to heal our divisions within."

For a political newcomer, Trump has appeared to find comfort in the tangle of politics. He even has a re-election rally scheduled for tonight in Arizona, though the mix of local personalities and issues, combined with national tensions, could be explosive.