Democratic candidate Barack Obama was elected president of the United States for the first time on Nov. 4, 2008, and he was sworn in on Jan. 20, 2009. He defeated Republican John McCain with 52.9 percent of the general vote compared to McCain's 45.7 percent.
Obama was elected for the second time on Nov. 6, 2012, and was sworn in on Jan. 21, 2013. Joe Biden was Obama's running mate for both elections.
Obama served in the Illinois State Senate from 1997 to 2004. In 2005, he began a term as a U.S. Senator from Illinois. He is the first African-American U.S. President.