Although the economic crisis and other issues contributed to the election of Barack Obama, the Obama presidency is primarily a legacy of George W. Bush's decision to invade Iraq. Popular disenchantment with the war produced decisively negative views of Bush's performance, tarnishing his party's image and appeal as an object of identification. Hostility to the war and the president among ordinary Democrats fueled enthusiasm for Obama's candidacy, giving him an edge over Hillary Clinton and stoking his record-setting fund-raising. Data from the 2008 American National Election Study and Cooperative Congressional Election Study show that opinions on the war and the president had direct as well as indirect effects on the vote in the Democratic primaries and general election, in both instances to Obama's benefit. Bush's decision to invade Iraq and all that ensued, while not sufficient to produce an Obama presidency six years later, were almost certainly necessary to that outcome.