US Defense Secretary Leon Panetta on Wednesday called the Koranburning and killing of 16 Afghans "deeply troubling" incidents that had challenged the war effort in Afghanistan.

Visiting Afghanistan just days after a shooting spree by a US soldier, he insisted that NATO and Afghan forces were making progress and had to stay focused on the mission to defeat Al-Qaeda and reverse a Taliban insurgency.

Speaking to Marines, coalition troops and Afghan soldiers at Camp Leatherneck, Panetta acknowledged the Koran burning, Sunday's killings and attacks on coalition troops by Afghan soldiers had posed difficult challenges.

"Each of these incidents is deeply troubling," he said.

"We will not allow individual incidents to undermine our resolve.

"We will be tested, we will be challenged by the enemy, by ourselves and by the hell of war itself," Panetta added.

But he said "thanks to your efforts, our strategy is working."

Panetta held talks with Helmand provincial leaders, which Pentagon spokesman George Little described as an "excellent discussion".

"Secretary Panetta told them that the United States remains focused on the mission, and that recent events will not deter us from carrying it out," the spokesman said.

"Those events do not represent the Afghan people, the Afghan security forces, or US and ISAF (the US-led NATO mission in Afghanistan) forces -- the vast majority of whom are trying to do the right thing," he added.

Little then quoted provincial and military leaders as noting "we have never been closer to achieving our objectives" in Afghanistan.