Clinton won the popular vote , but ultimately Obama won more delegates . However , Barack Obama did not win enough delegates to secure the nomination until June 3 , after a 17-month-long campaign against Hillary Clinton . Obama had a wide lead in states won , while Clinton had won majorities in several of the larger states .