Obama increased the number of American soldiers in Afghanistan during his first term before withdrawing most military personnel in his second term. On taking office, Obama announced that the U.S. military presence in Afghanistan would be bolstered by 17,000 new troops by Summer 2009, on top of the roughly 30,000 soldiers already in Afghanistan at the start of 2009. Secretary of Defense Robert Gates, Secretary of State Hillary Clinton, and Joint Chiefs of Staff Chair Michael Mullen all argued for further troops, and Obama dispatched additional soldiers after a lengthy review process. The number of American soldiers in Afghanistan would peak at 100,000 in 2010. In 2012, the U.S. and Afghanistan signed a strategic partnership agreement in which the U.S. agreed to hand over major combat operation to Afghan forces. That same year, the Obama administration designated Afghanistan as a major non-NATO ally. In 2014, Obama announced that most troops would leave Afghanistan by late 2016, with a small force remaining at the US embassy. In September 2014, Ashraf Ghani succeeded Hamid Karzai as the President of Afghanistan after the U.S. helped negotiate a power-sharing agreement between Ghani and Abdullah Abdullah. On January 1, 2015, the U.S. military ended Operation Enduring Freedom and began Resolute Support Mission, in which the U.S. shifted to more of a training role, although some combat operations continued. In October 2015, Obama announced that U.S. soldiers would remain in Afghanistan indefinitely in order support the Afghan government in the civil war against the Taliban, al-Qaeda, and ISIL. Joint Chiefs of Staff Chair Martin Dempsey framed the decision to keep soldiers in Afghanistan as part of a long-term counter-terrorism operation stretching across Central Asia. Obama left office with roughly 8,400 U.S. soldiers remaining in Afghanistan.