Mr. Obama concluded in his first year that the Bush-era dream of remaking Afghanistan was a fantasy, and that the far greater threat to the United States was an unstable, nuclear-armed Pakistan. So he narrowed the goals in Afghanistan, and narrowed them again, until he could make the case that America had achieved limited objectives in a war that was, in any traditional sense, unwinnable.

“Just think how big a reversal of approach this was in just two years,” one official involved in the administration debates on Afghanistan said. “We started with what everyone thought was a pragmatic vision but, at its core, was a plan for changing the way Afghanistan is wired. We ended up thinking about how to do as little wiring as possible.”…

In interviews over the past 18 months, Mr. Obama’s top national security aides described the evolution of the president’s views on Afghanistan as a result of three rude discoveries.

Mr. Obama began to question why Americans were dying to prop up a leader, President Hamid Karzai of Afghanistan, who was volatile, unreliable and willing to manipulate the ballot box. Faced with an economic crisis at home and a fiscal crisis that Mr. Obama knew would eventually require deep limits on Pentagon spending, he was also shocked, they said, by what the war’s cost would be if the generals’ counterinsurgency plan were left on autopilot — $1 trillion over 10 years. And the more he delved into what it would take to truly change Afghan society, the more he concluded that the task was so overwhelming that it would make little difference whether a large American and NATO force remained for 2 more years, 5 more years or 10 more years.