Clinton had been viewed by many as the most likely to succeed President Obama in the years leading up to the election , after losing the Democratic nomination to him in 2008 , and entered the primaries as the firm favorite .