After easily defeating Alan Keyes to win his Senate seat and being sworn into office on January 4, 2005, Obama wrote "The Audacity of Hope", which was released in October 2006. Despite initially saying that he had no immediate plans to run for president and would serve out his full Senate term, Obama would go on to run for and be elected the 44th President of the United States on November 4, 2008, becoming the first African American to be elected to the nation's highest office. On November 6, 2012, Obama was reelected to a second term as President of the United States, defeating former Massachusetts governor Mitt Romney.