Last November, political adman Chris Mottola showed two sets of mock commercials to focus groups of Democratic primary voters: one for his client, Sen. Arlen Specter, and another that anticipated the moves of Rep. Joe Sestak, the opponent.
"We played out the whole campaign," Mottola said, and the results were ominous. "Afterward, I spent two days in the fetal position."
At the time, Specter had a massive lead in every poll, 20 percentage points or more. He had the grateful support of President Obama; Gov. Rendell was twisting arms and taking names; state Democratic organizations were consolidating behind him.
And nobody outside of his Delaware County-based congressional district had ever heard of Sestak, a former Navy admiral in his second House term.
But Mottola and the rest of the Specter strategists knew they were in for a rough ride.
After all, Specter, 80, had been a Republican senator for nearly three decades before switching teams in April 2009, after his critical vote for Obama's $787 billion stimulus bill crumbled his support in the GOP.
In the Specter campaign's private polling, only about a third of potential Democratic voters said they thought the five-term incumbent deserved reelection - despite healthy percentages who viewed Specter favorably and approved of his job performance.
And on Tuesday, Sestak beat Specter, 54 percent to 46 percent, likely ending the electoral career of Pennsylvania's longest-serving senator.
The outcome challenges the long-held notion that the White House and other big shots in a party can "clear the field" for its favored candidate to avert a divisive primary fight. And that's especially true when a potential foe is, like Sestak, motivated, well-funded, and running in a year when voters are mad at the political establishment.
Sestak, 58, has said that someone in the White House offered him a federal job to forgo a primary challenge to Specter, but he won't spell out details. Obama press secretary Robert Gibbs has for months deflected reporters' questions on the matter.
Specter's defeat also points to the continuing decline of Democratic Party machines and their union allies in modern campaigns, as technology evolves and fewer voters have ties to the party infrastructure. A huge turnout in Philadelphia, his strongest base, might have saved Specter, but it did not happen, despite the efforts of Rep. Bob Brady (D., Pa.), chairman of the Democratic City Committee, and members of the trade unions backing Specter.
"The biggest loser has got to be the party organization," said a Democratic candidate in another Pennsylvania race, who asked not to be identified in order to speak frankly about the party. "They're a paper tiger, a myth."
Philadelphia Democrats cast 164,496 votes in the Senate race; that's about 20 percent of the city's registered Democrats. Statewide, the turnout averaged 24 percent.
Turnout efforts may have been futile because of Specter's Republican past.
"A good field operation on Election Day can only do so much to compete with 30 years of voting against Republican Arlen Specter," said Rebecca Kirszner Katz, a Democratic strategist who worked on the 2007 mayoral campaign of Rep. Chaka Fattah (D., Pa.).
Beyond verbal sparring on mostly tangential issues, the race was static for months, with both campaigns' internal polling and public polls showing Specter with high approval ratings but low reelect numbers and big leads in a head-to-head matchup with Sestak.
Things began to move on April 20, when Sestak put up his first TV ad, a 60-second biographical spot that highlighted his Navy career and his record in Congress. Within two weeks, his campaign's internal polling went from showing him 22 points behind Specter to within 6 points, said Neil Oxman, founder of the Campaign Group, which did Sestak's ads.
"It was the 60-second bio that showed that there was an alternative, that Joe Sestak wasn't some kooky county commissioner from a place you never heard of - he was a real guy," Oxman said. "You rarely see that much movement from a positive spot."
Then came the "Switch" ad, the most talked about in the campaign. It showed footage of then-President George W. Bush endorsing Specter as a "firm ally" during the 2004 Republican primary, and the senator with Sarah Palin and then-Sen. Rick Santorum (R., Pa.). Between those scenes was a clip of Specter telling reporters last year that "my change in party will enable me to get reelected."
By primary day, Sestak had closed the gap in the polls. Oxman said of Specter, "The people who vote in primaries were predisposed to believe in the end that this guy switched parties just to save his job."
But Mottola agreed with Oxman that the decisive spot was the biographical Sestak ad, not the "reelected" one.
Meanwhile, the attacks that Specter launched against Sestak - that Sestak had missed 127 House votes, lost a top Navy job because of a "poor command climate," and paid most of his campaign staff less than the minimum wage - barely touched him, polls show.
"There were a lot of people who didn't like the fact that he switched parties," Rendell said of Specter during a news conference Wednesday. "But I don't think that the Specter campaign did a good job explaining the reason. I think the reason he switched was because he wanted to keep working for the people of Pennsylvania."
It was hard to refute the perception of opportunism because Specter had said in many forums at the time of his switch that he needed to become a Democrat to avoid a career-ending loss.
On the other side of the coin, Sestak was a relentless campaigner. He made more than 650 appearances over the last year, often driving overnight in his Prius to campaign in Pittsburgh, then turning right around to come back to Philadelphia.
"Joe would go to events and we'd collect e-mails and phone numbers, then follow up and stay in contact," said Richard Sestak, the candidate's brother and campaign director. "Democrats like to kick the tires. . . . Ours was a grass-seed campaign that sprouted when we went on the air."
For a long time, Sestak's journeys seemed quixotic.
"When everybody was laughing at him for talking to five people at some diner here or there, he was focused," said a national Democratic strategist who had a role in the race. "Those groups of five became committed volunteers."
Sestak built his campaign in concentric circles, the way a classic presidential campaign does in the retail-politics atmosphere of the Iowa caucuses.
In January, his campaign began making 3,500 phone calls a day to prospective voters from its Media headquarters, ramping up to about 7,000 calls a day near the end of the race, Richard Sestak said.
Because the challenger began the stretch run with $4 million less than Specter, it was vital that he save his television advertising for the final four weeks, when voters start paying closer attention. Some analysts wonder if the outcome might have been different had Specter begun running commercials earlier, forcing Sestak to do the same or fall hopelessly behind.
"By allowing Sestak to condense the race into a four-week sprint instead of a three-month marathon, the Specter campaign effectively negated their cash advantage," said Mark Nevins, a Democratic strategist in Philadelphia.
Now, Sestak has to unite Democrats and replenish his bank account as he takes on Republican nominee Pat Toomey, who started TV advertising Thursday.