President Trump unveiled a new strategy for the U.S. war in Afghanistan on Aug. 21. (Victoria Walker/The Washington Post)

On Monday night, President Trump once again had to look at a teleprompter and say words he had never expected to say. Even though he had said for years that the United States should pull out of Afghanistan, Trump announced that he would send more troops to the country’s longest war.

“My original instinct was to pull out — and, historically, I like following my instincts. But all of my life, I’ve heard that decisions are much different when you sit behind the desk in the Oval Office,” Trump said in a rare moment acknowledging a change of mind.

In a speech before hundreds of military members that lasted nearly 30 minutes, Trump couldn’t bring himself to provide an exact number of troops or the exact cost of his decision. And while he briefly complained about having inherited “a bad and very complex hand,” he laid out a military strategy that was remarkably similar to that of his predecessor.

Then he offered a promise that could be difficult to keep: “One way or another, these problems will be solved. I’m a problem-solver. And in the end, we will win.”

For years, Trump criticized the war in Afghanistan. In October 2011, after exploring a run for president focused on attacking then-president Barack Obama, he tweeted: “When will we stop wasting our money on rebuilding Afghanistan? We must rebuild our country first.” In the months that followed, Trump tweeted that “it is time to get out of Afghanistan” and “Afghanistan is a total disaster” and “Time to come home!”

President Trump speaks at Fort Myer in Arlington on Monday night about strategy in Afghanistan. (Carolyn Kaster/AP)

It was an easy stance to take for a non-politician about a deeply unpopular war. And it was one that Trump continued on the campaign trail once he decided to run for the White House, saying in October 2015 that invading Afghanistan was a “terrible mistake” — while also saying that “it’s a mess” and that U.S. troops would likely have to stay because “that thing will collapse in about two seconds after they leave.” (Later that month, Trump clarified and said that it wasn’t a mistake to invade Afghanistan following the 9/11 attacks.)

At campaign rallies, Trump sometimes daydreamed aloud about everything the United States could afford to do if it just stopped spending so many hundreds billions of dollars on war — a message that seemed at odds with his pledge to “bomb the hell” out of the Islamic State and seize oil fields that they control.

Trump said Monday night that once he became president, he studied the situation in Afghanistan and reached a decision late last week. To make his reluctant announcement, he stayed inside the Beltway and ventured across the Potomac River to Arlington.

Standing in front of a line of military flags, Trump carefully read from the teleprompters and resisted any urge to go off script or crack jokes. He used the same serious tone that has accompanied many of his major speeches during his first seven months in office, including his inaugural address and his remarks to a joint-session of Congress — moments that some suggested showed a fresh change in demeanor for the president, who then quickly proved them wrong.

Obama — Trump’s designated foil — gave a similarly reluctant speech in December 2009 when he announced that he would send 30,000 additional troops to Afghanistan in hopes that he could “end this war successfully.” For that speech, Obama traveled to West Point in New York and spoke directly to a stoic crowd of cadets for more than 30 minutes, laying out the full history of the war for nearly 9-1/2 minutes before delivering his announcement — spending the remaining time explaining and defending the decision. The mood in the room was heavy, and Obama prompted applause just a handful of times. Secretary of State Hillary Clinton and other top officials were dressed in black.

In a lecturing tone, Obama repeatedly said that this decision was not an easy one for him to make and he ran through the arguments against it, including that this could be a repeat of the Vietnam War and that the surge would likely cost even more American lives, along with an additional $30 billion. Although he rattled off successes that the country had under his leadership, he didn’t stray from that focus — and he reflected on how the war had divided the country.

Trump — speaking six days after a press conference in which he said “both sides” were to blame for violence at a white supremacist gathering in Charlottesville, Va. — also acknowledged that the country is divided and called for unity without mentioning any of the highly charged issues that currently separate Americans. The solution that he presented sounded as simple as withdrawing from Afghanistan.

“When we open our hearts to patriotism, there is no room for prejudice, no place for bigotry, and no tolerance for hate,” Trump said. “The young men and women we send to fight our wars abroad deserve to return to a country that is not at war with itself at home. We cannot remain a force for peace in the world if we are not at peace with each other.”

Nearly eight years ago, when Obama announced a surge, he acknowledged that his decision could lead to even more deaths of American troops. He told the audience of cadets, who had not yet seen battle, that he had signed a letter of condolence to the family of each troop killed at war.

“I have read the letters from the parents and spouses of those who deployed. I visited our courageous wounded warriors at Walter Reed. I’ve traveled to Dover to meet the flag-draped caskets of 18 Americans returning home to their final resting place,” he said. “I see firsthand the terrible wages of war.”

On Monday night, Trump opened his remarks by focusing on the bravery of those who choose to serve in the military and spoke gloriously of those who are killed in battle.

“Since the founding of our republic, our country has produced a special class of heroes whose selflessness, courage, and resolve is unmatched in human history. American patriots from every generation have given their last breath on the battlefield for our nation and for our freedom,” Trump said. “Through their lives, and though their lives were cut short, in their deeds they achieved total immortality.”