WASHINGTON (NYTIMES)- President Donald Trump's scepticism about the United States' involvement in Afghanistan was no secret to his staff.
But his top national security officials were still taken aback at a meeting in the Situation Room on July 19, when an angry Trump began ripping apart their latest proposal to send thousands of additional US troops to the country.
"We're losing," the president declared, according to a person who was in the room. The plan, he complained, was vague and open-ended, with no definition of victory. "What does success look like?" he asked.
The day before that meeting, Trump had invited four soldiers who had served in Afghanistan to the White House for lunch.
His exchanges with these enlisted men, an official said, left him sober about the prospects for turning around a war that has dragged on for nearly 16 years. He showed up the next day determined to ask hard questions.
On Monday night, Trump finally put forward a broader strategy for Afghanistan, one that would require thousands more U.S. troops but place more conditions on the Afghan government. His decision, several officials said, was less a change of heart than a weary acceptance of the case, made during three months of intense White House debate by the military leaders who dominate his war Cabinet.
In the end, these officials said, Trump accepted the logic that a "big military" approach was needed to prevent Afghanistan from again becoming a launching pad for terrorism against the United States.
Persuaded there were no other options, Trump became the third American president to send young men and women into the longest war in US history.
His journey to that decision was starkly different than that of his predecessor, President Barack Obama. Unlike Obama, who ran for office promising to turn around the war in Afghanistan, Trump scarcely mentioned it on the campaign trail.
But he had long opposed the war, in keeping with his general aversion to U.S. military entanglements. As a private citizen, he repeatedly called on Obama to withdraw the troops.
"It is time to get out of Afghanistan," Trump wrote on Twitter on Feb. 27, 2012, a period when he was beginning to think about running for president.
"We are building roads and schools for people that hate us. It is not in our national interests."
That summer, he ratcheted up his calls after a series of attacks by Afghan soldiers on U.S. troops. "Why are we continuing to train these Afghanis who then shoot our soldiers in the back?" he wrote on Aug. 21, 2012. "Afghanistan is a complete waste. Time to come home!" The next year, Trump went so far as to embrace Obama in his decision to pull out U.S. troops.
"I agree with Pres. Obama on Afghanistan," Trump wrote on Jan. 14, 2013. "We should have a speedy withdrawal. Why should we keep wasting our money - rebuild the U.S.!"
But once in the White House, Trump populated his Cabinet with people who had a long history in Afghanistan. His defence secretary, Jim Mattis, is a retired Marine Corps general who lost troops in fierce combat there early in the war. His national security adviser, Lt. Gen. H.R. McMaster, ran an anti-corruption task force that worked with the Afghan government.
This spring, Mattis and McMaster began drafting a plan to send upward of 4,000 additional troops to Afghanistan, beyond the 8,400 that were already there. They believed the influx would help the Afghan army stabilise a fast-deteriorating security situation in the country.
The debate got little public attention. Afghanistan had faded from the headlines, and the White House was grappling with a cascade of other news, from the investigation of Trump's ties to Russia to the nuclear standoff with North Korea.
But there were already dissonant voices. Stephen K. Bannon, Trump's former chief strategist, worried that the generals were leading the president down the same path as Obama, who felt boxed in by his generals in 2009, his first year in office, when he agreed to send 30,000 additional troops. Bannon questioned why an additional 4,000 troops would fix the situation.
"For 16 years, from neocons to progressives to Obama's people, they all thought they were making great decisions," Bannon said, according to a person in the room. "Why are we any smarter than they are?" At a meeting of the National Security Council's principals committee, he clashed with McMaster, who had taken the lead in developing the policy. Their relationship deteriorated, and Bannon became McMaster's biggest in-house nemesis.
In late May, a truck bomb exploded in the Afghan capital, Kabul, killing more than 150 people and raising doubts about the survival of the government of President Ashraf Ghani. Alarmed, Mattis and McMaster intensified their push for Trump to sign off on a troop increase.
But the broader policy was still skeletal. It lacked any strategy for dealing with neighbouring Pakistan, where many of the terrorist sanctuaries lay.
Still, Trump authorised Mattis to send up to 4,000 additional troops - a decision the Pentagon announced in a cryptic late-afternoon news release on June 14 that played down its significance and suggested it was a stopgap measure. White House officials said nothing publicly about the decision, and Mattis said he would not send any troops until there was a broader policy in place.
Bannon, meanwhile, continued to play disrupter. As the administration tried to flesh out the policy, he recruited two outside businessmen - Erik D. Prince, a founder of the private security firm Blackwater Worldwide, and Stephen A. Feinberg, co-founder of Cerberus Capital Management - who proposed plans to substitute private military contractors for U.S. troops. Both men owned companies that supply contractors and would have profited from such a policy.
On a Saturday morning in early July, Bannon visited Mattis at his office in the Pentagon to lobby him on the unorthodox concept.
Mattis listened politely, officials said, but dismissed it. Although Bannon continued to share his views privately with Trump, he did not show up for any more National Security Council meetings and largely faded from the process, even before he left the White House on Friday.
But other new figures emerged after the contentious July 19 meeting. Vice President Mike Pence, not McMaster, chaired a principals meeting on Afghanistan the following week. Pence's views were not sharply different than those of McMaster. But the general's relationship with Trump had become difficult, with the president bridling at what some describe as his aide's didactic style.
Pence, officials said, understood where Trump was coming from and tried to interpret the president to the National Security Council staff.
Secretary of State Rex W. Tillerson also became more vocal, having objected to the lack of a diplomatic component in the initial proposal from McMaster. His position was complicated by the fact that the State Department had just dismantled the office of its special representative for Afghanistan and Pakistan.
By early August, the White House chief of staff, Reince Priebus, had been forced out and replaced by John F. Kelly, another retired Marine general.
As the secretary of homeland security, Kelly had attended National Security Council meetings where Afghanistan was discussed. But now he became centrally involved, warning Trump's aides that they needed to develop solid answers to his questions about how to measure success there.
By then, the options for dealing with Afghanistan had narrowed to three: pull out, pour in more troops or shift to a covert counterterrorism strategy led by the CIA. But the CIA director, Mike Pompeo, was hesitant to throw the agency into the war full-scale, according to one official, because of its difficult history there.
The generals kept pushing for more troops, but Trump insisted on knowing why the other two options were deemed not feasible.
On Aug. 10, the president summoned his team to his golf club in Bedminster, New Jersey, where he was on a less-than-tranquil vacation.
The generals told the president that a complete pullout would leave Afghanistan in danger of becoming another haven for the Islamic State, as happened in Iraq. And Pompeo's reservations about a major role for the CIA undercut the counterrorism strategy.
McMaster continued tweaking the plan, which now had benchmarks for reducing corruption in the Afghan government and for pressing Pakistan to wipe out terrorist sanctuaries on its border with Afghanistan.
On Friday, McMaster and the rest of the national security team flew to Camp David for what turned out to be a decisive meeting. Trump signed off on the strategy, and the team posed for a grim-faced group portrait with the president.
Back in Washington, Bannon had vacated his office and was returning to his old employer, the right-wing website Breitbart News.
On Monday, a few hours before Trump was to speak, Breitbart published an interview with Prince, in which he criticized the president for not being more receptive to his proposal for mercenaries. "The presidency by its nature lives in a bubble," Prince said.
"When you fill it with former general officers, you're going to get that stream of advice."