(CNN) -- The U.S. defense chief called on President Hamid Karzai to thank Americans for the sacrifices of those who fought and died in Afghanistan rather than level criticism at the United States.
Secretary of Defense Leon Panetta's comments Friday followed accusations by Karzai that the United States is not doing enough to fight terror in neighboring Pakistan.
Karzai also said the United States is failing to supply Afghan forces with weapons it needs to fight insurgents.
"Look, we have made progress in Afghanistan because there are men and women in uniform who have been willing to fight and die for Afghanistan's sovereignty," Panetta told reporters shortly after landing in Lima, Peru, for a meeting with Latin American defense officials.
"Those lives were lost fighting the right enemy not the wrong enemy, and I think it would be helpful if the president, every once in a while, expressed his thanks for the sacrifices that have been made by those who have fought and died for Afghanistan, rather than criticizing them."
The sharp reaction from Panetta, a rare public dressing down of the head of a country, came a day after Karzai accused the United States and NATO of attacking insurgents in Afghanistan rather than targeting the support they receive from Pakistan.
"The U.S. and NATO should go to the places where the roots of terrorism exist. They are saying one thing but acting contrary to that," Karzai said at a news conference in Kabul, according to CNN affiliate Tolo TV.
Karzai also threatened to turn to Russia and China among others if the United States did not supply Afghanistan with equipment needed to fight the insurgency.
"I asked the U.S. government to equip our air force with weapons, intelligence and transport planes -- we still haven't received a response from them," he said. "Our discussions will continue next week as well, and if they show no interest in this, we will decide whether to purchase from Russia, China, India or any other country."
Karzai's criticism of the United States come as relations between Kabul and Washington have steadily eroded in recent months, pushed in part by the accidental killing of civilians and the U.S. military's refusal to surrender a number of prisoners to Afghan control.
Tensions have been further exacerbated by attacks against coalition troops by Afghan troops or insurgents disguised in security uniforms that have left dozens dead.
The timing of Karzai's criticism comes as the United States surpassed a military casualty milestone last month, with more than 2,000 U.S. troops killed in the 11-year war.
Karzai laid some of the blame on the United States for the shelling of Afghanistan's eastern border provinces by insurgents inside Pakistan, saying his forces were not sufficiently equipped to respond and the United States should have stepped up.
"According to the Afghan-U.S. strategic pact, the U.S. is committed to defend Afghanistan against any such foreign threat until the Afghan forces find the ability," he said. "We asked them several time but they never accepted that these attacks were occurring."
Panetta said the United States remains committed to timetable to withdraw American combat troops from Afghanistan by the end of 2014.