Barack Obama became the first black President of the United States in 2008, winning with 338 electoral votes compared to John McCain's 173 votes. He received over 207 million total votes, becoming the first African American elected to the highest office in the country and showing that democracy and views on race had progressed since the civil rights movements of the 1950s and 60s. Obama had pledged to end the Iraq war and fix the struggling economy during his campaign.