The 2008 United States presidential election in Illinois was held on November 4, 2008. Illinois voters chose between Republican John McCain, a Senator from Arizona, and his running mate, Sarah Palin, governor of Alaska, and Democrat Barack Obama, a Senator from Illinois, and his running mate, Joe Biden, a Senator from Delaware. Ultimately, Obama, who came from Illinois itself, won the state and its 21 electoral votes. This was largely due to the fact that he was from Illinois, and his popularity in Chicago. He won 3.42 million votes. McCain won, in contrast, just 2.03 million votes. This was the last presidential election in which over 20 counties in Illinois voted for a Democrat, and the first presidential election in which 6 Illinois counties a Democrat won the election (including Kane, Caroll, Kendall and McHenry Counties). This was the only presidential election in which 3 counties in Illinois, Boone, McHenry and Kendall Counties, voted for the Democratic candidate.