The top U.S. and coalition commander in Afghanistan says that President Barack Obama's decision to keep about 10,000 American troops in the country past 2014 has eliminated any uncertainty Afghans may have had about America's commitment.

President Barack Obama, left, is introduced by Marine Gen. Joseph Dunford, commander of the US-led International Security Assistance Force (ISAF) at Bagram Air Field, Afghanistan, Sunday, May 25, 2014. (AP Photo/ Evan Vucci)

Gen. Joseph Dunford told reporters Wednesday the decision will allow an advisory force of 9,800 troops to remain in the country to finish training and equipping Afghan security forces.

Obama announced plans Tuesday for keeping nearly 10,000 U.S. troops in Afghanistan after this year, then quickly withdrawing nearly all of those forces by the end of 2016.

The commitment is conditional on Afghanistan's government signing a stalled bilateral security agreement. While Afghan President Hamid Karzai has refused to sign it, both the candidates running to replace him have said they will.