When Pennsylvania Democrats effectively ended the political career of Sen. Arlen Specter last month, many were left wondering how a relatively obscure second-term congressman could take down a veteran politician who had survived the ebbs and flows of Pennsylvania politics for decades.

Some appraisals stressed Rep. Joe Sestak's television ads. Others emphasized the energy of his backers and of Sestak, who motored around the state at all hours to meet voters at coffee shops and train stations. Still others painted the upset with the broader brush of anti-incumbent fervor - even though Sestak himself is an incumbent.

Certainly these were all important, but Sestak could also express gratitude for his victory with the phrase, "Thank you, Mr. President."

Sestak can thank the president for his efforts leading up to the 2008 presidential primary, when Obama and his Pennsylvania organization helped push the number of registered Democrats past four million - an increase of more than 111,000. He can thank the president for adding those new Democrats to the rolls before his run against another new (and dubious) Democrat, Specter, who joined the party last year after 44 years as a Republican. That broader base of potential support was especially valuable in a state that restricts primary voting to registered Democrats.

Sestak can also thank the president for his tepid support of Specter. Although Obama did endorse the senator - a fact one could hardly forget in the flurry of Specter ads replaying the moment - he failed to stump for him in the waning days of the campaign. He even flew over Pennsylvania, without stopping, on his way to an event in Ohio that fateful Tuesday. If the president had visited Philadelphia, he almost certainly would have driven turnout past the paltry 20 percent it reached in the state's largest city, and Specter's base.

(Did the president sense a shift in the winds? If anyone could understand such opportunism, it would be Specter.)

Most of all, Sestak can thank Obama not for who he is - a president with an approval rating of less than 48 percent - but for what he left behind. Specter ran with the image of Obama's endorsement in a state where he lost the presidential primary - another race decided by Democratic voters. Sestak, meanwhile, took advantage of the Obama campaign's leftovers - 111,227 leftovers, to be exact.

These 111,227 new members of the party joined specifically to vote for a Democrat - not an independent or a Republican. Certainly many were motivated by enthusiasm for Obama. But one must assume they felt some affection for the party that eventually made the Obama presidency a reality. One can reasonably infer that Sestak bested Specter among these recent registrants.

When all was said and done, Sestak won 64 of Pennsylvania's 67 counties and lost two of them by less than a percentage point. He was beaten in Philadelphia by a 2-to-1 margin, and yet he won his home county, Delaware, by slightly more than that margin.

We don't know if Sestak will be as successful in November, but we know why he'll be on the ballot. As the campaign thanks its supporters and works to mobilize them over the next few months, it should also give thanks to its most high-profile non-supporter, President Obama.