KANDAHAR, Afghanistan (AP) — Defense Secretary Ash Carter has told American soldiers in Afghanistan that their mission as advisers to the Afghan military is key to cementing security gains.

He spoke at the large base in Kandahar on the second day of his visit to Afghanistan. Carter told the soldiers that the Afghan security forces are strong and now "stand a chance" of prevailing over the Taliban.

Carter told a gathering of about 100 soldiers that training and advising Afghan security forces is "becoming the heart" of a U.S. military mission that is winding down after 13 years of war.

Carter also got briefed on American military operations as part of what he called a listening tour of the war zone in his first week as defense secretary.

Carter flew to Kandahar from Kabul, the capital, where he met with Afghan government leaders and American military commanders.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.