The United States' war in Afghanistan, launched in 2001 after the terror attacks on the World Trade Center and the Pentagon, is now in its 15th year, making it the longest military campaign in U.S. history. U.S. President Barack Obama vowed to end his country's involvement in that fight, and he has worked assiduously — some would say with reckless disregard — to keep that promise. Last week, however, Obama bowed to the inevitable and announced that he would extend the U.S. military mission in Afghanistan. His decision is a bitter pill for the president — not only because it means he will not accomplish one of his most cherished goals but because it means that the Afghan government is unable to defend itself.

There were 33,000 U.S. military personnel in Afghanistan when Obama took office, a number he boosted by almost one-half to help stabilize "a deteriorating situation." Those numbers were increased by another 4,000 fighters after a 60-day review. At the end of 2009, the president announced that he would again increase the number of U.S. forces in the country, this time by 30,000, but also revealed that he would begin reducing that headcount by July 2011.

Six months later, Obama announced that withdrawals would begin at the end of 2011, with 10,000 troops returning home in December 2011and another 23,000 troops departing by the following summer. The president's plan was to hand over responsibility for Afghan security to Afghan forces by the end of 2014. By then the bulk of U.S. and NATO forces would be withdrawn, with a residual force remaining to provide limited security and advice.

U.S. plans were complicated by a testy relationship with then Afghan President Hamid Karzai. Karzai was a mercurial leader, who sought to maintain control over Afghan politics after he left office. He saw the U.S. as a convenient means to establish his nationalist credentials — beating up on Washington was a good way to build a relationship with the Taliban, the militant Islamic force that had ruled Afghanistan and was ousted by the U.S.-led coalition.

Karzai's successor, Ashraf Ghani, had no desire to cut ties with Washington. During a March 2015 visit to Washington, Ghani pressed Obama to revise his plan to cut the American troop presence to 5,000 by the end of 2015 and pull almost all forces out by January 2017.

Ghani's request was based on a cool assessment of his military's capabilities and what he saw was not encouraging. The United Nations reports that the Taliban are now more established in Afghanistan than at any time since they were removed from power nearly 15 years ago. Earlier this month, they took control of the city of Kunduz, a key outpost in the north of the country, for two weeks, before being forced to retreat.

After yet another "extensive, lengthy review," Obama agreed to Ghani's request. Now, nearly 10,000 U.S. forces will remain in Afghanistan through most of 2016 and then drop to about 5,500 at the end of that year or in early 2017. This is, said Obama, a "modest but meaningful expansion" of the U.S. presence in Afghanistan.

Apart from the failure to honor his campaign promise, this revision is troubling. The U.S. has invested $65 billion to train and equip the Afghan military and police forces; Washington spent $4.1 billion in 2015 alone (a figure that includes providing food for soldiers, fuel for their vehicles and paying Afghan soldiers' salaries).

While Afghan forces have improved their performance — they do not run from battle as is the case with Iraqi forces trained by the U.S. — their performance is still flawed. They take high casualties in battle and their attrition rate — a number that combines soldiers killed and those who quit — is about 1.8 percent a month. That is a reduction from previous numbers, but it is still so high as to make it difficult for the military to do its job. Currently, the army is authorized to have 195,000 soldiers but it can only field 173,000. Critics also charge the U.S. has focused on the wrong areas in its training efforts. The chief task should be building a military leadership that can undertake the combined operations needed for a large modern military to function effectively. (This inability to forge an effective fighting force has plagued U.S. efforts throughout the world and is evident in Iraq and Syria too.)

While Obama and his supporters are disappointed in the decision to scale back the withdrawal, others believe that the U.S. should do more. They charge that the U.S. must reverse the perception that it is eager to withdraw, a belief that encourages enemies to merely wait out the U.S. They want American forces to go on the offensive, to do more to neutralize the Taliban and prop up Ghani's government.

There is some truth to the argument that the U.S. desire to get out of Afghanistan (and Iraq) empowers the opposition to the government in Kabul (and Baghdad). But there is an equally real danger that a U.S. presence can encourage the incumbent government to shirk its responsibility to provide for national security. The U.S. cannot want a safe and stable Afghanistan more than the government in Kabul does. That is a recipe for a truly never-ending war.