Secretary of Defense Leon Panetta on Friday said America is succeeding in Afghanistan, but warned that enemies are looking for new ways to inflict damage.

"In particular, they have sought to take advantage of a series of troubling incidents involving misconduct on the part of American troops," he said in a speech at Fort Benning, Georgia. "These days, it takes only seconds for one picture to suddenly become an international headline."

"I know these incidents represent a very, very small percentage of the great work that our men and women do every day across the world," Panetta said, "but these incidents concern me — and all of the Service Chiefs — because they show a lack of judgment, a lack of professionalism, and a lack of leadership on the part of some of our men and women in uniform."

“While these are seemingly isolated events by a few bad apples,” Michael Smith, a professor of communications at La Salle University in Pennsylvania told msnbc.com, “they may come to symbolize America to the Afghan population. If this becomes the case, our mission is doomed and the lives of our troops at greater risk.”

Earlier this week, President Barack Obama made a surprise visit to Afghanistan, where he signed an agreement that spells out a winding down of the war as well as a longtime commitment to staying there.

The Strategic Partnership Agreement, which was nearly two years in the making, was described by the President as a historic moment for Afghanistan and the U.S. NBC's Atia Abawi reports.

Though no specifics on the number of troops who will remain in an advisory capacity, perhaps for a decade, were announced, the agreement pledges support after 88,000 combat forces leave Afghanistan in 2014 after what will be 13 years of war.

In the meantime, the United States has said it is committed to stabilizing the Afghan government in the face of a messy insurgency from the Taliban, which hours after Obama’s visit launched a suicide car bomb attack that killed seven people in an a compound housing hundreds of westerners.

According to Anthony H. Cordesman of the Center for Strategic and International Studies in Washington and a former Defense Department intelligence assessment director, concerted communications campaigns to build up the images of American troops and the war effort started at the beginning of the Afghan conflict. The campaigns got a whole new emphasis in 2009 when a leaked report by U.S. and NATO commander Gen. Stanley McChrystal bluntly stated that without more forces and a new counterinsurgency strategy in Afghanistan, failure was likely. The report also said the Afghan government was riddled with corruption.

“Similarly, there has been a consistent effort to provide sensitivity and cultural training to U.S. troops, trying to make them aware trying to make them aware how Afghans see the world and Afghan values,” Cordesman said.

In insurgency campaigns — in Afghanistan’s case the Taliban trying to wrest control from the NATO-backed Afghan government — how civilians perceive each side in a conflict is key to cooperation during the war as well as stability afterward, Cordesman pointed out.

Two Americans have been killed following days of protesting over the recent burning of the Quran at a NATO military base. NBC's Atia Abawi reports.

“The history, almost regardless of who does this," he said, "is that very often you get the cultural values wrong. You can’t communicate as well as a movement that is local.”

Speaking to the troops is useful, Cordesman said, but it is not a way of having a large impact on what the Afghans think about Americans in the short run. The Quran burning was a particularly egregious episode culturally — it sparked weeks of violent protests — while urinating on bodies and posing with photographs could be viewed as an act of revenge, which Afghans understand, Cordesman said.

While such incidents are damaging, in the end it will be support for the Afghan government that will allow the United States to claim victory in Afghanistan, Cordesman said.

“It’s not support for us that counts,” he said. “It’s support for them that makes transition to any kind of strategic victory possible.”