Congress Has a Breaking Point. This Week, Trump Might Have Found It.

“We don’t often have great votes about great questions around here about separation of powers,” said Senator Rand Paul, Republican of Kentucky, adding, “I don’t think you can overstate how important it is that for the first time in the history of the country, the full Congress voted to tell the president that we can’t be in a war.”

Mr. Trump made it clear he would fight the bipartisan challenges to his authority.

“He feels good,” said Senator Lindsey Graham, Republican of South Carolina, a close ally of Mr. Trump who talked to the president shortly after the vote. “He said, ‘My veto will be sustained?’ I said, ‘Yeah, overwhelmingly.’ He feels like his commitment to build the wall is moving forward.”

But the rare coalition of Democrats and Republicans could bolster legal challenges to the emergency declaration that could tie up wall funding indefinitely. And the mere act of defying Mr. Trump foreshadows potential new difficulty for the president as he seeks to push his agenda through a Democrat-controlled House and a less pliant Republican-controlled Senate.

“There are moments where you see a partisan rebuke” of the president by Congress, said William G. Howell, a political scientist at the University of Chicago and the author of “Power Without Persuasion: The Politics of Direct Presidential Action.” “They are really pretty infrequent, and when you do observe them it speaks to real tumult in the party.”

Senator Chuck Schumer of New York, the Democratic leader, said he hoped “the votes this week are green shoots: Republicans, out of courage, out of principle and maybe out of principle or maybe exasperation, are beginning to constrain the president when he goes too far.”

Most Republicans cast their votes as a matter of conscience, and some Republicans who fashion themselves “constitutional conservatives,” such as Senator Ben Sasse of Nebraska, tied themselves in knots explaining how vexed they were to side with the president. Senator Thom Tillis of North Carolina, one of the first Republicans to declare his support for overturning the emergency declaration, faced a huge backlash from conservatives and flipped his vote at the last second.

House Republicans, who joined Democrats in voting to call for Mr. Mueller’s report to be made public, insist there was no tumult.