Kandahar, Afghanistan (CNN) -- On his last visit to Afghanistan as defense secretary, an emotional Robert Gates assured U.S. forces there that he would never forget them or his role in deploying them.
"I just want to come out here to thank you for the last time for your service and for your sacrifice," Gates told troops in Kandahar, choking back tears as he spoke. "More than anybody except the president, I'm responsible for you being here. I'm the person that signed the deployment papers that got you here, and that weighs on me every day."
Saying he considered himself "personally responsible" for ensuring that U.S. forces had what they needed to succeed and return home safely, or receive proper care if wounded, Gates said: "I just want you to know I think about you every day, I feel your hardship and your sacrifice and your burden, and that of your families, more than you can possibly know."
"You are, I believe, the best our country has to offer, and you will be in my thoughts and prayers, every day for the rest of my life," Gates said. "Thank you."
Gates also addressed the question of a planned withdrawal of some U.S. troops starting in July, saying "nobody wants to give up the gains that have been won at such a hard cost, and nobody wants to give our allies the excuse to run for the exits."
"I have confidence that we'll strike the right balance," he said.
Leaving in as many combat troops as possible for as long as possible is "a no-brainer," Gates told reporters, but he added that the initial withdrawal would likely be a mix of both combat and support personnel.
"We don't have that many support people out here, so it's probably going to end up being a mix -- some combat elements, and some support elements," Gates said.
Earlier, Gates toured U.S. operations in blazing heat as he continued his final visit to the country before stepping down as defense secretary at the end of June.
After arriving Saturday, Gates met with President Hamid Karzai as news arrived that four NATO service members were killed when a roadside bomb exploded in eastern Afghanistan.
At a news conference with Karzai, Gates was upbeat about progress despite an uptick in fighting between insurgents and soldiers.
"I believe that if we can hold on to the territory that has been recaptured from the Taliban between ourselves and the Afghan forces and perhaps expand that security, that we will be in a position toward the end of this year to perhaps have a successful opening with respect to reconciliation, or at least be in a position where we can say we've turned a corner here in Afghanistan," Gates said, referring to political reconciliation talks.
Karzai awarded Gates the Wazir Akbar Khan medal, the highest governmental award. It's named after an Afghan leader who fought against the Russians.
Gates commented on the period from the 1989 Soviet withdrawal to the Sept. 11, 2001, attacks on the United States by al Qaeda -- the terror organization once harbored by the Taliban when it governed Afghanistan.
"Twenty years ago, the U.S. walked away from Afghanistan in the wake of the Soviet withdrawal, believing that our job was done, that what happened here subsequently would not affect our own security and national interests," Gates said, referring to American support of the Afghan mujahedeen fighters who challenged the Soviets. "I remember this all too well, as I was in a senior position in the U.S. government at the time. That tragic miscalculation was exposed by the attacks of September 11, 2001."
Karzai raised the issue of civilian casualties during NATO airstrikes, a major obstacle to promoting support for the coalition and government fight against militants. He said he told Gates that the bombing of Afghan homes must not be repeated.
"We can't take any more airstrikes where many civilians get killed. And we can't keep up our peace efforts when civilians get killed with those Taliban who are not connected to al Qaeda," Karzai said.
On Sunday, Gates told reporters that "we haven't often listened early enough to President Karzai" on issues such as civilians casualties.
"We need to take those concerns seriously" and make adjustments as long as they don't increase the risk to U.S. and NATO forces, he said.
The Afghan NGO safety office told CNN that in the first quarter of this year, it tracked a 54% rise in violence across the country, including incidents targeting NATO, the insurgency and civilians. It expected the trend to continue in the second quarter and that the violence seemed to be mostly rising in the eastern part of the country.
The four troops killed Saturday increased the number of international troops death in June to 10. In May, 58 coalition troops were killed, according to a CNN count of coalition figures, and more than 225 international soldiers have died in Afghanistan this year.
CNN's Nick Paton Walsh and Joe Sterling and Journalist Livia Borghese contributed to this report