The White House is at war with its allies and depending on its critics to win negotiating authority for a trade agreement it desperately wants. The leading Democratic advocate of the president’s proposal voted against it in a critical Senate roll call. The president openly ridiculed the Democratic senator who is the leading voice on the issue that he believes is the most significant domestic challenge facing the United States.

The country is in new political waters. This is not what Barack Obama had in mind when he vowed to change how Washington works.

This is how it used to work: Presidents always seek fast-track authority to negotiate trade agreements. In the end they always get it. Lawmakers always express skepticism about the labor and trade elements of these pacts. In the end they cave.

The familiar pattern didn’t turn out in the familiar way last week, though lawmakers engaged in a complicated pas-de-deux that provided the embattled president with the embarrassing equivalent of a do-over. The immediate consensus was that a stunning event had occurred in the capital.

The initial rejection of fast-track negotiating authority for the Trans-Pacific Partnership reflected vast changes in American political life.

It also reflected deep problems in the ties between the president and Democrats on Capitol Hill, underlined how Mr. Obama’s frosty relationship with his Republican rivals endanger a measure that both support, illuminated how dangerous is Hillary Rodham Clinton’s instinctive caution as she pursues the Democratic presidential nomination and revealed important tensions between some of the leading GOP candidates and the constituencies they hope to mine for support in next winter’s primaries.

Here’s the new political alignment in Washington, building since the NAFTA debate in the Bill Clinton years and now firmly in place: The Republicans no longer are a protectionist party. The Democrats no longer are a free-trade party. (Only one Democrat sided with Mr. Obama in the initial vote last week, requiring the frantic backroom negotiations that provided the pact with new life. There may be no other important vote in American history when a president won only a single vote from his own party in the Senate.)

The United States, moreover, no longer has the robust free-trade impulse it once possessed growing out of national confidence in the skills of American workers and the attractiveness of American products in a world market.

Then there’s this: The president doesn’t get — and in the view of this Congress at least, doesn’t deserve — the benefit of the doubt in trade negotiations.

But among all the ironies twisted like seaweed around the rusty anchor of the trade issue, none is quite as remarkable as this one: The Trans-Pacific Partnership, which would include Canada, Japan and Vietnam and is intended to blunt China’s economic ascendancy, depends primarily on Republican support — even as two-thirds of GOP primary voters consider themselves conservatives and by a substantial margin conservatives believe these sorts of trade agreements hurt Americans.

The three Republican senators running for president extend varying degrees of support for the TPP. Sen. Marco Rubio of Florida missed the initial vote last week but is strongly identified with the measure. Both Sen. Ted Cruz of Texas and Sen. Rand Paul of Kentucky sided with the president, though Mr. Paul has expressed grave concerns about the secrecy surrounding the pact.

The latest Wall Street Journal/?NBC News Poll shows that those who say they could support Mr. Paul believe, by a 41 percent to 36 percent margin, that these sorts of trade agreements hurt the country. Potential supporters of other GOP presidential candidates, with the exception of former Gov. Jeb Bush of Florida, register roughly similar sentiments.

There are even larger political difficulties on the Democratic side.

Even in ordinary circumstances a president not running for another term finds that his power is diminished with lawmakers, who often pride themselves on their independence. James K. Polk and Theodore Roosevelt learned this long ago when they disavowed re-election campaigns and soon regretted it.

But the challenge isn’t only Mr. Obama’s. Ms. Clinton has tiptoed around the issue even though she once was counted as an administration advocate for the pact. Many of her supporters, especially labor leaders and environmentalists, are hostile to the TPP.

Ms. Clinton’s only public statement since becoming a candidate came in New Hampshire last month, when she said that any trade deal “has to produce jobs and raise wages and increase prosperity and protect our security,” adding, “We have to do our part in making sure we have the capabilities and the skills to be competitive.”

That’s political boilerplate, language so innocuous it could easily be employed by Mr. Paul, Mr. Rubio or Mr. Cruz. Her labor allies will demand a less ambiguous statement, and she surely will be asked how she would have voted had she remained in the Senate.

But it is the woman who is not running for president who poses the biggest danger for both Mr. Obama and Ms. Clinton.

Sen. Elizabeth Warren of Massachusetts — the leading voice on the income-disparity issue that the president and Ms. Clinton have embraced with ardor — has only stiffened her opposition to the pact since Mr. Obama said that “her arguments don’t stand the test of fact and scrutiny” and “she’s absolutely wrong.”

Ms. Warren has focused much of her criticism on the so-called Investor-State Dispute Settlement element of the TPP, which she says would undercut American sovereignty by allowing foreign companies to sidestep American courts in trade disputes. But her opposition to the pact reflects broader worries about the economic prospects for American workers — concerns reflected in the Journal/?NBC Poll, which shows the greatest opposition to free trade among those with high school educations or less.

The TPP debate isn’t over — it’s likely the agreement will come back for a meaningful congressional vote on its merits — and neither are the tensions it generates. Eventually Ms. Clinton will be forced to weigh in on it, and the president may be forced to adjust his lobbying techniques as Ms. Warren rallies her allies in opposition to the president, and perhaps to Ms. Clinton.

David Shribman, a Pulitzer Prize winner in journalism, is executive editor of the Pittsburgh Post-Gazette.