In the general election, facing Democratic nominee, Senator Barack Obama of Illinois, McCain was trailing during most of the season, only gaining a lead in national polls for a period after the Palin announcement and the 2008 Republican National Convention. 