In 2015, Secretary of Defense Ash Carter ended the ban on women in combat roles, and in 2016, he ended the ban on transgender individuals openly serving in the military. On the international stage, Obama advocated for gay rights, particularly in Africa. On the international stage, Obama advocated for gay rights, particularly in Africa. During the 2008 presidential election, Obama strongly criticized the Iraq War, and Obama withdrew the vast majority of U.S. soldiers in Iraq by late 2011. On taking office, Obama announced that U.S. combat forces would leave Iraq by August 2010, with 35,000–50,000 American soldiers remaining in Iraq as advisers and trainers, down from the roughly 150,000 American soldiers in Iraq in early 2009. In 2008, President Bush had signed the U.S.–Iraq Status of Forces Agreement, in which the United States committed to withdrawing all forces by late 2011.