U.S. President Barack Obama's administration has decided to keep U.S. military bases and conduct counterterrorism operations in Afghanistan after bringing the longest war in America's history there to an end in 2014. But its decision, centered on keeping a substantial residual military force, risks locking the United States in a low-intensity but never-ending war in that lawless, rugged country.

The Bilateral Security Agreement (BSA) reached between Washington and Afghan President Hamid Karzai last week defines a U.S.-led counterterrorism and training mission involving up to 12,000 NATO troops, mostly American, lasting "until the end of 2024 and beyond" unless terminated with two years' advance notice. This will mean virtually an indefinite U.S. troop presence in Afghanistan with a mandate, as the text says, to "conduct combat operations."

Obama's decision in favor of strong military basing in Afghanistan — where there are currently about 45,000 American troops — stands in sharp contrast to his earlier action in pulling out all U.S. forces from Iraq after a decade-long American occupation of that country.