"We have to learn the lessons from each incident so we do everything possible [so] they don't happen again," Panetta told the troops, CNN reported, adding that the tragedies "do not define the relationship between the coalition forces and the Afghan people."
The U.S. defense secretary spoke days after a U.S. enlisted man wandered off his post and began a killing spree. He said the crises, including the accidental burning of Korans by U.S. troops, would would not change the U.S. strategy for the country.
Panetta is the first administration official to visit Afghanistan since a U.S. sergeant allegedly killed 16 Afghan citizens Sunday.
The killings have stoked long-simmering anger over the decade-long U.S. war and occupation. Panetta decried the tragic events of the last few days --- an Afghan soldier was killed when a government delegation was attacked during a memorial for the victims -- while saying the relationship between U.S. and Afghan officials remained firm.
"I understand that questions are going to be raised as a result of the events of the last few weeks," Panetta told reporters en route to Afghanistan. "[But] it is very important for policymakers to keep their eye on the target."
The war effort also has been crimped by an unpopular Afghan government and a growing anti-American sentiment among the country's war-weary population.
Panetta, however, maintains the core of the U.S. approach in Afghanistan is sound, and is expected to relay that message to Afghan President Hamid Karzai and other senior Afghan officials during his two-day visit.
Earlier, The Washington Post reported, an Afghan stole a pickup truck and rammed through a fence in an apparent attempt to attack Panetta's plane as it arrived at Camp Bastion, a British base adjoining the U.S. Camp Leatherneck. U.S. officials said Panetta was unharmed and carried on with his visit as planned.
A U.S. military spokesman said the suspect in custody is an Afghan who stole the small pickup truck from a NATO soldier on the base. The soldier was injured in the carjacking.
Swim Week Miami Beach 2014 [PHOTOS]