Carolyn Kaster / AP

Updated June 23, 2015, 11:43 a.m.

A trade package that appeared all-but-dead earlier this month is now on the verge of passage after the Senate on Tuesday voted to advance a bill giving President Obama “fast-track” authority to negotiate international trade agreements.

On a vote of 60-37, the Senate moved to end debate on Trade Promotion Authority legislation, the core piece of the agenda that Obama has struggled to push through Congress. A final vote to send the bill to the president’s desk is expected on Wednesday.

The breakthrough occurred after House Democrats initially blocked the trade package by voting down a separate piece providing Trade Adjustment Assistance for displaced workers. But Obama and Republican leaders then went around Democrats by splitting off the aid bill—traditionally a sweetener for Democrats—and passing Trade Promotion Authority by itself. To retain the support of pro-trade Democrats, Speaker John Boehner and Senate Majority Leader Mitch McConnell promised to hold a second round of votes on Trade Adjustment Assistance once the fast-track bill passed, when most liberal Democrats would have little incentive to defeat it.

“This has been a long and twisted path to where we are today,” McConnell said after the vote. Trade Promotion Authority will allow Obama to complete a pending agreement with 12 Pacific Rim nations that would be subject only to an up-or-down vote in Congress—without amendments. A second major agreement with the European Union could follow, although that likely won’t be finished during Obama’s presidency.

June 18, 2015, 2:28 p.m.

Shortly before the House voted on Thursday—for the second time in a week—to deliver President Obama the authority he was seeking to negotiate trade agreements abroad, Speaker John Boehner was asked if he had learned anything from the dead-one-moment, alive-the-next legislative battle.

Nope, the speaker replied. “I would describe most of what’s gone on the last three weeks as close to bizarre,” he told reporters. “I don’t think I’ve learned anything from it.”

Boehner was certainly correct in the initial part of his reply. Just six days ago, House Democrats overwhelmingly repudiated Obama’s trade agenda by defeating the one part of that package—Trade Adjustment Assistance—that was included to garner their support. Led by Republicans, the House then approved the core piece, “fast-track” Trade Promotion Authority, but because Democrats rejected the aid for displaced workers, the underlying legislation remained stalled. Nancy Pelosi, the president’s loyal partner for six-and-a-half-years, betrayed him on the House floor, and Obama’s top domestic priority was left for dead—or so everyone thought.

The Democratic revolt was surprising enough, but what’s happened since has been equally unusual. Spurned by his friends, Obama responded to the setback not by trying to win them over, but by conspiring with Republicans against them. (Yes, the same Republicans who are simultaneously suing him for abuse of power.) With backing from the administration, the House jettisoned the worker assistance from the trade package and on Thursday, approved Trade Promotion Authority on its own. The vote, 218-208, was nearly identical to the one last week, but now the new bill must go back to the Senate before Obama can sign it.

To keep pro-trade Democrats on board, the White House and Republican leaders promised them that they would pass Trade Adjustment Assistance, or TAA, separately if they can. How do they hope to do that? By attaching that measure to an even more popular bill—which passed the House and Senate nearly unanimously—that maintains trading preferences for African nations.

In other words, we’ve reached the peak sausage-making phase of the trade fight. It’s oddly reminiscent of the biggest legislative lift of Obama’s first term: healthcare reform. After Scott Brown’s surprise Senate victory in Massachusetts cost Democrats their filibuster-proof majority, then-Speaker Pelosi considered all sorts of legislative machinations—remember “deem and pass”?—to get Obama’s landmark bill to his desk. When she finally turned to the obscure budget maneuver known as reconciliation to finish the job, Republicans cried foul.

This time, the protesters were Democrats. Rosa DeLauro, the Connecticut liberal who has led the fight against trade in the House, denounced the move as “a gimmick,” and she noted ruefully that Obama had ignored his party’s plea for changes to the bill. “The administration,” DeLauro said, “has shown absolutely no interest in improving this deal or even listening to our concerns.” Union leaders complained about “parliamentary trickery” just days after they used similar legislative tactics to defeat the trade bill initially. Pelosi, meanwhile, criticized the legislation but held her tongue on the process. “God knows,” she said, “I know the power of the speaker.”

Obama’s trade agenda may be revived, but it is not yet enacted. The Senate next week must vote again on both TPA and TAA, and the strange Obama-GOP alliance will have to hold on to the same dozen or so Democratic senators that supported the trade bills last month. Once Trade Promotion Authority passes the Senate again and goes to the Oval Office, the House would vote again on Trade Adjustment Assistance, with the assumption that Democrats will have no reason to oppose it if doing so won’t stop fast-track trade authority from becoming law.

It’s confusing, and, yes, bizarre. But contrary to Boehner’s take on the whole ordeal, there might be something to learn after all. Republicans have complained, to the president, the public, and the courts, that when they don’t give Obama what he wants, he simply goes around them. The last week has demonstrated that he’s perfectly happy to go around Democrats, too.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.