Barack Obama's tenure as the 44th president of the United States began with his first inauguration on January 20, 2009, and ended on January 20, 2017. Obama, a Democrat from Illinois, took office following a decisive victory over Republican nominee John McCain in the 2008 presidential election. Four years later, in the 2012 presidential election, he defeated Republican nominee Mitt Romney to win re-election. Obama was succeeded by Republican Donald Trump, who won the 2016 presidential election. He was the first African American president, the first multiracial president, the first non-white president, and the first president to have been born in Hawaii.