It had come to this: Nancy Pelosi needed John Boehner to help save her party and her president from an ugly public meltdown.

By Friday morning, it was clear that a crucial piece of Barack Obama’s trade initiative was barreling toward defeat. Democrats were disjointed, dispirited, even angry in some cases. At the same time, they knew that they – not Republicans – would shoulder much of the blame for killing the president’s top legislative priority and for the ensuing spectacle of a party at war.


So just before noon, with debate already underway on the House floor, Pelosi picked up the phone and called Boehner to inform him that a must-pass component of the White House trade package was going to fail. It was the second such warning from Pelosi to Boehner in two days.

“Are you still going ahead?” Pelosi asked him, according to sources familiar with the call. “Are you going to pull the bill?”

No, he wasn’t, Boehner replied. This was his best chance to push fast-track trade authority across his unpredictable House floor, he told Pelosi.

Hours later, the House resoundingly defeated Trade Adjustment Assistance, a federal aid program to help workers who lose their jobs to free trade. The vote effectively scuttled Obama’s bid for fast-track trade authority – though Republicans may try to revive it in the coming days or weeks – because it was conditioned on approval of the jobs bill.

Pelosi was a minor player for much of Obama’s push to secure authority to clinch the Trans-Pacific Partnership, a 12-nation pact that would be the largest free-trade deal in history. But as the vote neared, and major Democratic opposition bubbled to the surface, she was in a wrenching position: naturally inclined to deliver for a president she’s worked hand-in-glove with for years, but all-too-aware of the strong progressive winds within her caucus against a deal Democrats believe would jilt American workers.

Up until moments before Friday’s vote, Pelosi hadn’t told a soul how she was going to vote on TAA or Trade Promotion Authority, the fast-track trade law Obama was seeking.

No one could get a good read on her: Some Democrats thought Pelosi was wary of the trade package, others believed she’d ultimately back Obama. Still others figured she’d split the difference, backing TAA, but bucking Obama’s request for fast-track authority.

On Friday morning, before she spoke to Boehner, Pelosi told Obama — sitting in her office during a last-ditch visit to the Capitol — that she probably wouldn’t back TAA, a necessary precursor to the fast-track vote he worked hard to pass.

But when Pelosi’s decision was final that she would split with the president, one of her aides – not the California Democrat herself – delivered the news to the White House.

The Pelosi-Obama relationship hit a low point on Friday.

For years, Pelosi was Obama’s legislative wizard. As speaker of the House after Obama took office, she ruled with an iron fist, muscling Obama’s health care bill through Congress, passing cap-and-trade legislation and Wall Street reform, and helping the president whip the votes for a massive stimulus package. It’s not a stretch to say that the biggest legislative achievements of the Obama era were a direct result of Pelosi’s efforts.

But over the past few weeks, Pelosi struggled to figure out a strategy as the president pushed a free-trade agenda that the vast majority of House Democrats and their allies in the progressive movement vehemently disliked.

Pelosi’s unwillingness to commit allowed her ally, Connecticut Rep. Rosa DeLauro, and other opponents to rally opposition against the trade package. In the end, just 126 lawmakers backed TAA, while 302 opposed it, including 144 Democrats.

TPA – the fast-track bill that was supposed to be the real challenge – narrowly cleared the House after months of whipping by Ways and Means Chairman Paul Ryan (R-Wis.) and other Republican leaders. But Republicans structured the process in a way that both bills had to pass to advance to the president’s desk.

“America is being watched by the rest of the world as to whether or not America is going to lead in the world,” Ryan said at a news conference after the vote. “I think this sent the right signal. The president has some work yet to do with his party to complete this process. This isn’t over yet.”

But if Obama is to win fast-track authority to complete the Trans-Pacific Partnership, he’ll have to convince nearly 80 Democrats to change their vote from yes to no. Many Democrats and Republicans doubt that will happen any time soon.

The Democratic debacle made the House Republican Conference – which has lurched from one to mishap to the next over the past five years – look like the model of stability. And some party officials are worried about the political fallout.

“This is just a huge black eye to the entire party,” a Democratic aide said, arguing that setbacks like this for the Obama White House could hurt Hillary Clinton’s chances of being elected in 2016.

New York Rep. Steve Israel, who leads House Democrats’ messaging wing, put it this way: “The past two hours hasn’t been among our finest two hours.”

The repudiation of Obama came after an intense White House campaign to lock up Democratic votes for fast-track powers. Obama took four rank-and-file Democrats to the G7 in Krun, Germany as a reward for supporting him on trade. He and his aides picked their brains about how he could sew up enough votes to win.

Rep. Gerry Connolly (D-Va.) and other trade supporters had a two-and-a-half hour dinner with White House Chief of Staff Denis McDonough in Germany. Connolly provided a list of Democrats he thought could be won over. McDonough said Obama would call those members, and the White House would have their back if anyone tried to distort the trade vote, Connolly recalled.

Meanwhile, House Republicans — led by Ryan, Boehner, Majority Leader Kevin McCarthy (Calif.) Majority Whip Steve Scalise (La.) and his chief deputy, Patrick McHenry of North Carolina — expanded their list of ‘yes’ votes rapidly from the mid 100s to 190, far more than they expected.

But this time, Republicans weren’t the story. Democratic disunity was.

Pelosi confounded her members and leadership team as she had to serve two conflicting roles. As Democratic leader she was trying to improve a piece of legislation sought by the Democratic president. But as a trade-wary progressive congresswoman from San Francisco, she was inclined to vote against the very same bill.

When Democrats first turned against TAA, which they typically support, Pelosi spent days negotiating with Boehner over how to pay for the bill, heartening supporters. She won concessions from Republicans and defended her talks with Republicans to fellow Democratic leaders and the rank and file, leading many to believe she would vote yes. She even grew frustrated with colleagues, like her good friend DeLauro, when they doubted the merits of the deal.

But the frustration went the other direction, too. DeLauro was furious that Pelosi was even negotiating with Boehner. And as the opposition grew in size —and volume — so did Pelosi’s hesitance. At a meeting with top House Democrats on Wednesday, Pelosi told then she would prefer to support Obama, but she came from a working-class background, and his request for fast-track authority didn’t cut it with her.

“There are no votes for TAA, they have 50 to 70,” Pelosi said of Republicans at the meeting, according to sources in the room.

Under almost any other scenario, Democrats would reflexively vote to provide hundreds of millions of dollars to laid-off workers. Instead, they complained that small amounts of Medicare money would be used to finance it, an objection that quickly morphed into opposition to the entire bill as a way to scuttle the trade package writ large.

As the no votes stacked up, the White House team kicked into gear, trying to tamp down opposition among Democratic lawmakers, a group with whom he had fostered little good will.

He dispatched emissaries to Capitol Hill to woo Democrats. Labor Secretary Tom Perez, Treasury Secretary Jack Lew and SBA Administrator Maria Contreras-Sweet all tried to twist Democrats’ arms. McDonough met privately with a number of lawmakers. Business groups were also engaged: In the hours leading up to the vote, Tom Donahoe, the leader of the Chamber of Commerce, was making calls to save TAA.

On Thursday, Pelosi and Boehner huddled on the House floor and swapped vote counts, according to sources in both parties. Pelosi said her numbers were very bad for TAA. Boehner said he thought Republicans could produce 100 votes, three times as many as they usually do for the bill. Pelosi shot back “How about 150?”

TAA, and therefore fast track, were in big trouble.

A few hours later, on Thursday night, it was clear Obama needed to step in himself. First he went to the congressional baseball game to glad-hand members of both parties. While Obama made his rounds on the field, some in the crowd were wearing “Stop TPA” T-shirts as they sat in a sweltering Nationals Park. Then, at around 11:30 p.m. Thursday, the White House and Pelosi’s office planned a surprise visit by Obama to the Capitol for the next morning, hours before the vote.

It was a dramatic gesture, the kind that Obama has avoided for years. He’s had little success in wooing members of Congress from either party over the years, and his allies dismissed such efforts as made-for-TV drama.

But by Friday morning, there was the president, walking into a closed-door meeting in the Capitol Visitors Center to try to rally House Democrats. Pelosi was by his side. Inside, he implored lawmakers to “play it straight” on the vote.

“We’re not the other party, we’re not the tea party,” Obama said, according to sources in the room. He took no questions, Pelosi said nothing and the pair left the room together.

Once Obama left, Rep. Keith Ellison (D-Minn.) told fellow Democrats that he “was offended by what the president said” in suggesting TAA opponents weren’t playing it straight. Rep. Brad Sherman (D-Calif.) and others echoed Ellison.

Rep. Ron Kind (D-Wis.), a top trade supporter, said his sister and other relatives were union members, yet he would still support the package.

Rep. Jan Schakowsky (D-Ill.) broke into tears. She told Democrats how close she was to Obama.

Then she went to the House floor and voted “no.”

Follow @politico