The history of the United States from 2008 to present began with the collapse of the housing bubble, which led into the late-2000s recession, helped the Democrats win the presidency in 2008 with the election of Barack Obama, the country's first African-American president. The government enacted large loans and economic stimulus packages aimed at improving the economy. Obama's domestic initiatives also included the Patient Protection and Affordable Care Act, which by means of large reforms to the American healthcare system, created a National Health Insurance program. President Obama eventually withdrew combat troops from Iraq, and shifted the country's efforts in the War on Terror to Afghanistan, where a troop surge was initiated in 2009. In 2010, due to continued public discontent with the economic situation, unemployment, and federal spending, Republicans regained control of the House of Representatives and reduced the Democratic majority in the Senate.
In 2011, Obama announced that al-Qaeda leader Osama bin Laden was killed by U.S. forces during a covert operation in Pakistan while the Iraq War was declared formally over the same year. The following year Obama was re-elected president. In June 2013, the Supreme Court struck down Section 3 of the Defense of Marriage Act, which resulted in the recognition of legally performed same-sex marriages by the federal government. In 2015, the Court ruled that all states must grant same-sex marriages as well as recognize others performed in different states in Obergefell v. Hodges.