President Barack Obama won an unusual ally in his fight for fast-track trade authority  — his 2012  campaign trail rival: Paul Ryan.

With other House GOP leaders, Ryan delivered more than double the votes Democrats could muster for the most consequential of Friday’s votes on wide-ranging trade authority. Republicans were 86 of the 126 yes votes for Trade Adjustment Assistance. That bill ultimately failed, 301-126, and in the end, Democrats could only muster 40 votes.

Prominent Democrats like House Minority Leader Nancy Pelosi (D-Calif.) opposed TAA, but House Speaker John Boehner (R-Ohio), Majority Leader Kevin McCarthy (R-Calif.) and Ryan himself supported it.

Check out PowerPost, a new Washington Post site for leaders

In a press conference following the vote, Ryan praised his party and pro-trade Democrats and shifted the burden of the next vote to Obama.

“This isn’t over yet and we hope they can get together and make sure that we finish this so that America is back leading,” he said. “I am hopeful that the Democrats understand the consequences and get together with the president and finish this as soon as possible.”

Now, the ball is back in the White House court if the president has any hope of securing negotiating power for a trade agreement that has become a key part of his agenda this year.

Despite the dramatic TAA failure, Republicans decided to go ahead with a later fast-track vote that narrowly passed, 219-211, with 191 GOP votes (it’s unclear whether it will actually mean anything). House leaders now plan to give Obama the weekend to persuade his party to find enough votes to pass worker retraining as part of TAA and complete the package. Votes are expected before Tuesday.

But Republicans don’t seem to need convincing.

Over the past few months, the House Ways and Means Committee chairman took it upon himself to personally make the sell for trade, shaking hands and keeping tabs on members even as the “no” votes increased.

The Wisconsin Republican sought solutions to Democratic concerns, made impassioned pleas on the House floor and held a rally for Republican trade supporters in a small committee room inside the Capitol. In the end, nearly every Republican member on his powerful tax-writing committee voted in favor of both the TAA retraining program and fast-track authority.

“We were committed to making sure we don’t stall out the trade agenda and [Trade Adjustment Assistance] is the price of doing it,” said Ways and Means Committee member Rep. Charles Boustany, (R-La.). “We put up a pretty significant number of Republicans votes up there.”

It isn’t unusual for Democrats in the White House to partner with Republicans on trade. The North American Free Trade Agreement passed with more Republican than Democratic votes when President  Bill Clinton was in office. But Ryan needed to rally votes not just for trade legislation but for a bill that gives expanded power and authority to a president his party has already accused of extensive executive overreach.

Many of the most conservative Republicans, including the nearly 40 members of the conservative House Freedom Caucus, were votes he could never expect. Others, including House Rules Committee Chairman Pete Sessions (R-Texas), would agree to vote for a total trade package but would not sign on to TAA.

“The Democrats did not support it and if they’re not going to support it, then it must mean there’s a problem with it,” Sessions said. “So we’re not going to support it.”

Some Republicans, like Rep. Adam Kinzinger (R-Ill.), said he has always supported TAA’s worker retraining because it a relatively small program that is helpful to constituents in his district in the exurbs of Chicago.

“I’ve always voted for it, I believe in it,” he said. “It is a relatively inexpensive program and each of us in our districts have situations where people have utilized it and I think it’s a good program.”

Kinzinger said there’s a chance that the trade failure could turn away some Republicans who supported retraining. He said there are probably some who felt like they went out on a limb to help Obama and Democrats, who didn’t live up to their part of the bargain.

If the matter is revisited, Democrats will again be expected to deliver the majority of the 218 votes needed to pass TAA and Republicans will try to make up the rest.