Nearly two weeks after his ambitious trade agenda was nearly derailed by fellow Democrats, President Obama is poised to clinch the biggest legislative victory of his second term with a Senate vote Wednesday that would give him the authority he says he needs to complete a sweeping 12-nation Pacific Rim accord.
The prolonged battle, which strained relations between the president and his party, came with the help of longtime Republican adversaries. Many Democrats oppose the coming Trans-Pacific Partnership and similar trade deals because they believe the pacts will sacrifice U.S. jobs to cheaper overseas competition.
Arguing that the trade deal is vital to countering China's rising economic power, Obama overcame vehement opposition from big trade unions and fellow Democrats by forging a rare alliance with House Speaker John A. Boehner (R-Ohio) and Senate Majority Leader Mitch McConnell (R-Ky).
The political turnaround followed intense White House lobbying and a heavy dose of backroom deal-making to secure the final votes needed.
"This has been a long and rather twisted path to where we are today, but it's a very, very important accomplishment for the country," McConnell said. "America is back in the trade business."
The so-called fast-track bill cleared its final procedural hurdle Tuesday in the Senate by a 60-37 vote. There wasn't a single vote to spare in overcoming a Democratic-led filibuster. Thirteen Democrats joined the GOP to advance the measure, and five Republicans bucked the Senate leader and voted no.
Final Senate passage is expected Wednesday, sending the measure to the president's desk.
"Within reach is an opportunity to shape tomorrow's global economy so that it reflects both our values and our interests," said U.S. Trade Representative Michael Froman. "Now it's time for Congress to follow through."
Fast track, also known as trade promotion authority, would allow the president to assure potential trade partners that the deals they negotiate with the U.S. will be presented to Congress for a yes-or-no vote without amendment.
Trade is a major driver of California's economy, so the ultimate outcome of the Pacific deal will affect many businesses and workers in the state. California is home to the nation's busiest ports and a big exporter of electronics, farm products, machinery and many other goods and services — much of that going to Pacific Rim countries, including those involved in the negotiations.
Key to winning the support of the 13 Democrats were assurances from both the White House and Republican leaders that the House and the Senate also would vote on a related bill to provide worker retraining funds for employees who lose their jobs as a result of trade.
That measure, a longtime Democratic priority that most Republicans oppose, is expected to have a vote in the Senate on Wednesday and in the House on Thursday.
"It's a pretty big victory for the administration, for Obama — a victory for pragmatism," said David Bach, senior associate dean at the Yale School of Management, noting that the political cost to the president of splitting with his own party was worth the potential gains of U.S. leadership in the Pacific.
"The fact that Obama was able to work with Speaker Boehner and come up with a backup plan is not the kind of thing people would have perhaps expected in this climate of ultra-partisanship," Bach said. "It keeps alive the potential legacy of his pivot to Asia."
Others, though, believe the president may have severely damaged his ability to work with his party in his remaining 18 months in office.
"It's a policy victory but not necessarily a political victory," said Julian E. Zelizer, a Princeton University history professor. "This vote and the decision to work around House Democrats will aggravate the tensions that already exist with liberals.
"There isn't enough time left in his presidency to really see the impact the trade pact will have, but this bipartisan victory will have some negative reverberations among allies on the Hill."
This month, in a rare rebuke of Obama by his own party, House Minority Leader Nancy Pelosi (D-San Francisco) led Democrats in preventing an earlier version of the fast-track package from advancing. Democratic presidential front-runner Hillary Rodham Clinton also voiced concern that the proposed trade deal would not do enough to protect American workers.
Days later, House Republicans, working closely with the White House, passed a new fast-track bill and sent it back to the Senate.
Democratic critics blasted Tuesday's vote and predicted the trade deal will benefit only large corporations and result in more U.S. factory closures.
"It's a great day for the big-money interests, not a great day for working families," said Sen. Bernie Sanders (I-Vt.), who is running against Clinton for the Democratic nomination for president.
The politics of the trade vote also splintered Republicans, especially conservatives who were loath to provide greater authority to an administration they do not trust or to help Obama score a political victory key to his legacy.
Though most Republicans support the trade agenda, Boehner and McConnell struggled to build enough support for passage. In a last-minute flip-flop, Sen. Ted Cruz (R-Texas), a GOP presidential contender, voted against the fast-track measure, complaining it had been tainted by Washington "deal-making."
Pressure on members of Congress has run high in recent days.
The AFL-CIO ran ads against the trade vote warning lawmakers that American workers will suffer. That put organized labor on the same side as the conservative Heritage Action for America, which told lawmakers that they should vote no because the broader trade package is tarnished by political trade-offs and government pork.
The U.S. Chamber of Commerce and leading business interests urged senators to pass the legislation.
As late as Monday it was still unclear whether the White House and Republican leaders would muster the votes they needed.
McConnell vowed that the worker assistance program would get a Senate vote Wednesday after being attached to a popular trade bill that gives preferences to goods coming from sub-Saharan African countries. The GOP leader also added to that bill a provision important to Ohio senators to protect the steel industry from illegally low-priced imports.
And McConnell pledged to do his best to have a conference committee of House and Senate lawmakers resolve differences over a currency bill sought by Democrats to punish countries that artificially inflate their currencies. House Republicans had loaded the currency bill with unrelated provisions on immigration and climate change that Democrats oppose.
A previous promise from McConnell to key Senate Democrats that he would allow a vote on reauthorizing the Export-Import Bank appears on track for July after senators return from a holiday recess.
Even so, pro-trade Senate Democrats remain skeptical about the chances of the retraining program and other measures passing in the House.
So the White House and GOP Senate leaders urged Boehner late Monday to tamp down such concerns. On Tuesday, the speaker assured senators that "we remain committed" to sending the entire package "to the president's desk this week and deliver this win for the American people."
The worker assistance bill still faces an uncertain future in the House because Republicans oppose the spending as government waste and Democrats previously voted against it as part of a broader strategy to halt the fast-track legislation. Under the previous version, both the fast-track authority and the retraining program had to pass the House in order to advance.
Now that fast track and the retraining program have been separated, House Democrats may no longer have a reason to vote against the assistance funds.
Though Obama has said he prefers to sign both bills together, he has not said whether he would sign the fast-track bill if the retraining measure fails to pass.
For the latest from Congress and the 2016 campaign trail follow @LisaMascaro