Carolyn Kaster, AP
President Barack Obama reaches to shake hands with troops after speaking at the Third Infantry Division Headquarters, Friday, April 27, 2012, at Fort Stewart, Ga. (AP Photo/Carolyn Kaster)

The most telling part of President Obama's surprise visit to Afghanistan this week was his grave warning to soldiers that difficult days lie ahead. That is, of course, in part because the United States has telegraphed the withdrawal of the major portion of its forces for 2014, giving the enemy a clear timetable and incentive to wreak havoc. But it is also true that the 10-year U.S. presence in Afghanistan has been marked by few days that were not difficult. An attack by burka-clad bombers and gunmen on a residential compound shortly after the president's departure underscored that.

The president is being criticized by some for making the trip as a thinly veiled publicity stunt meant to remind people how he ordered the assassination of Osama bin Laden one year ago. Regardless of that, however, what is clear is that the United States is going to have a keen interest in what happens in Afghanistan for a long time to come, and that the president's insistence on "finishing the job" and ending "this war responsibly" will be far more difficult than he made it seem.

As part of his trip, the president signed an agreement with Afghan President Hamid Karzai that provides a framework for how the United States will cooperate with the Afghan government after 2014. The 10-year pact calls for some U.S. forces to remain as military advisers, although exact numbers and their specific roles remain to be decided,

The president also made a point of saying his administration has been in direct talks with the Taliban, hoping to negotiate a more secure peace, provided the troublesome group agrees to cut its ties to al-Qaida. That would certainly make things a little easier for the Afghan government and its fledgling military. It would not, however, bring a final resolution to the problem that compelled the United States to launch the war in the first place.

President Obama defined that problem well. "We came here with a very clear mission to destroy al-Qaida," he said. That mission has not been accomplished. Divorcing al-Qaida from the Taliban would weaken it, but al-Qaida would remain as a threat to the United States. As that terrorist group has demonstrated in the past, it is perfectly content to bring its hatred of Americans to this country or any other part of the world where U.S. interests are located.

The secretive nature of the president's visit spoke volumes about how far Afghanistan is from becoming a peaceful, stable nation. Yes, the war in Afghanistan has become unpopular at home. After 10 years, more than 1,800 U.S. soldiers killed and more than 15,000 wounded, a recent CNN/ORC International poll found 72 percent of Americans opposing the war, with only 25 percent supporting it. It may indeed be time for the nation to draw down its forces and allow the Afghan government to fend for itself.

But the conflict that compelled the nation to war there is far from settled, nor will it be so long as terrorists remain committed to destroying our way of life.