Kabul, Afghanistan (CNN) -- Defense Secretary Robert Gates on Monday offered his personal apology to Afghanistan President Hamid Karzai for the killings of nine Afghan boys last week in a NATO-led helicopter attack targeting insurgents, saying the incident "breaks our hearts."
Karzai responded at the joint appearance with the visiting Gates by saying he accepted the apology, which appeared to ease for now renewed tension over the issue of civilian casualties caused by the U.S.-led NATO forces fighting Taliban insurgents in Afghanistan.
"While we take the apology with a lot of respect, agree with it and accept it today, I would request Secretary Gates that you take the plea of the Afghan people to Washington that these civilian casualties stop and make the utmost effort so that we don't have them anymore," Karzai said.
The remarks were intended to show that Karzai and his government were moving past the incident despite public anger over the killings and the continuing presence of the U.S.-led military force.
Gates cited that anger in his apology, saying that the deaths of the boys who were cutting wood was "a tragedy for their families" and "a setback for our relationship with the Afghan people whose security is our chief concern."
"I would also like to offer President Karzai my personal apology because I know these tragedies weigh heavily on his heart and create problems for him as the leader and protector of the Afghan people," Gates continued.
Gates arrived earlier Monday on the previously unannounced trip. It was his 13th visit to Afghanistan since he became defense secretary in 2006.
The timing appeared intended to address Karzai's anger over the killing of the nine boys. Until Monday, Karzai had indicated that previous apologies, including one from U.S. Gen. David Petraeus, the commander of the U.S.-led military coalition, were insufficient.
Meeting with U.S. troops at Bagram Airfield after his arrival, Gates choked up when a service member asked him what kept him up at night.
"You all," Gates responded, his voice catching. He said he thinks about the U.S. forces deployed in Afghanistan every day, before joking that Congress also keeps him up.
Gates is scheduled to meet with senior officers and Afghan leaders during his visit to Afghanistan. He will be traveling to southern and eastern parts of the embattled country.
The defense secretary last traveled to Afghanistan three months ago, in December 2010. Gates prefers to tour the embattled country quarterly to monitor the war effort, according to Pentagon Press Secretary Geoff Morrell.
From Afghanistan, Gates will fly to Stuttgart, Germany, to visit the U.S. Africa Command and will continue to Brussels, Belgium, to attend a meeting of NATO defense ministers.
CNN's Rick Martin contributed to this report.