Barack Obama ran against the following main challengers in his two presidential elections:
- In the 2008 U.S. presidential election, Obama defeated the Republican nominee Arizona Senator John McCain. McCain's running mate was Alaska Governor Sarah Palin. Obama won 365 electoral votes to McCain's 173
- In the 2012 U.S. presidential election, Obama ran for re-election and defeated the Republican nominee Mitt Romney, former governor of Massachusetts. Obama won 332 electoral votes and 51.1% of the popular vote, while Romney received 206 electoral votes and 47.2% of the popular vote
These were the principal opponents Obama faced in the general elections during his two terms as president.