WASHINGTON — Senator Shelley Moore Capito, Republican of West Virginia, spent the last two weeks hammering out a deal on federal spending and border security with colleagues from both parties, reassured by a sense that Congress was finally asserting itself as a civil, stabilizing force.
The feeling did not last. On Friday, President Trump mounted one of the most serious executive branch challenges to congressional authority in decades, circumventing Congress with an emergency declaration. It would allow him to unilaterally divert billions of dollars to a border wall and presented his Republican allies on Capitol Hill, who labored on a legislative compromise, with the excruciating choice of either defending their institution or bowing to his whims.
The president’s move left Senate Republicans sharply divided, and it remains to be seen whether they will act collectively to try to stop Mr. Trump or how far into uncharted territory they are willing to follow a headstrong president operating with no road map beyond his own demands.
“With him you always have to expect the unexpected,” said Ms. Capito, speaking on the phone from her kitchen in Charleston, W.Va., exhausted from a week of late-night talks at the Capitol.
The Republican resistance to Mr. Trump’s emergency declaration was much more pronounced in the Senate than in the House, where a few Republicans — in the minority but more closely aligned to Mr. Trump — groused. But most of the conservative rank and file embraced it.
After threatening to kill the spending compromise needed to keep the government open, Mr. Trump opted to cite a national emergency to pry loose additional funding to build a wall longer than the 55 miles in the bipartisan agreement. It was the divisive step that Senator Mitch McConnell, Republican of Kentucky and the majority leader, Ms. Capito and most other Republicans in the Senate had forcefully urged him not to take, because it would establish a precedent they feared future Democratic presidents would use against them.
The decision left Mr. McConnell, a professed guardian of the Senate’s prerogatives and power, joining with Mr. Trump in supporting an executive branch end run greater than any of the incursions into the legislative process he often accused President Obama of pursuing. Fellow senators said Mr. McConnell, a former member of the Appropriations Committee, was unhappy with the declaration but saw it as the only way to pass the spending bill.
Some top Republicans, led by Mr. McConnell, pivoted quickly to say they supported the president’s action because it was the only option left to him after Congress failed to meet his demands for wall funding. Mr. McConnell has even begun offering the president strategic advice on how best to push his plan, aides said.
But Mr. McConnell is also warning Mr. Trump of the damage it could inflict on the party heading into the 2020 elections. Other Republicans portrayed it as a gross violation of the constitutional separation of powers, a blatant disregard by the president for Congress’s fundamental role in determining how federal dollars are spent.
“He is usurping congressional authority,” Senator Susan Collins of Maine, a veteran member of the Appropriations Committee, said in an interview. “If the president can reallocate for his purposes billions of dollars in federal funding that Congress has approved for specific purposes and have been signed into law, that has the potential to render the appropriations process meaningless.”
Several other Senate Republicans publicly and privately joined Ms. Collins in describing the move as a flagrant breach of congressional jurisdiction and a dangerous precedent. Their numbers raised the clear possibility that enough Republican defectors could join with Senate Democrats to provide a majority to disapprove of the president’s decision should the opportunity arise.
Four Republicans might be enough to join with Senate Democrats and pass legislation rebuking the president, and leadership aides put the number of potential defectors as high as 10. But the unrest seemed well short of the sort of partywide revolt necessary to override a veto by Mr. Trump of any legislative attempt to prevent his declaration of an emergency, leaving a legal challenge as the only recourse.
“I would not vote for disapproval,” said Senator Richard C. Shelby, Republican of Alabama and the Appropriations Committee chairman who led the spending negotiations. “He’s got the power to defend the country, to defend the borders, to protect the people as commander in chief. I believe the courts would uphold him on this.”
Despite reservations about many of the actions taken by Mr. Trump and the White House over the past two years, most congressional Republicans have been reluctant to put too much distance between themselves and the president given his grip on Republican voters, many of whom consider the wall a national necessity. Mr. Trump exerts a powerful hold on his party, and lawmakers are cowed by the belief that opposing him will end in their political destruction.
Still, the emergency declaration was a direct assault on the ability of lawmakers themselves to restrain the president, and it raised expectations that more could balk at what was widely viewed as a serious case of executive overreach.
“Somebody is going to have to say enough is enough,” said Trent Lott, the former Senate leader from Mississippi, who questioned the wisdom of the move.
Even those senators who said they were willing to abide by the president’s decision did so grudgingly, acknowledging that it was a bad way to govern and could have significant consequences.
“I don’t see anything that necessarily violates the law, but that is a very different question from whether we should be doing it,” said Senator Mike Lee, a conservative Republican of Utah who is known for his view that Congress has handed over too much power to the executive branch.
“We have relinquished power voluntarily because we don’t want to make judgment calls that make people angry, so we leave it to the executive,” he said. “It’s almost as if Congress doesn’t want to go through the difficult task of lawmaking.”
Representative Matt Gaetz of Florida spoke for many House Republicans in praising the president’s action. “I’m proud of our president for boldly declaring he will not allow politics to stand in the way of the United States’ national security interests,” said Mr. Gaetz, a Trump ally.
Democrats were united in their condemnation, accusing Mr. Trump of claiming a false crisis because he could not win over Congress with his argument. They said the president was so desperate to build the wall as a difficult re-election campaign loomed that he was willing to shred the Constitution to do so.
“This is not how you use national emergencies,” said Mayor Rahm Emanuel of Chicago, a former White House chief of staff to President Barack Obama. “He is literally creating a constitutional crisis because he has a campaign crisis.”
With Republicans controlling both chambers of Congress during his first term, Mr. Trump never had to issue a veto. But that streak could be broken with a Democratic-led House joining with Democrats in the Senate and the right number of Republicans to support legislation voicing disapproval of the emergency declaration.
Party strategists said a veto could even bolster Mr. Trump by showing his backers that he was willing to take on Congress over his wall and that it was unlikely there would be enough votes to override it. The divide, though, could become a political problem for embattled Republican incumbents up for re-election next year, like Senator Cory Gardner of Colorado, who will face competing calls back home to break with the president or stick with him.
Some Republican senators said they were less concerned about the political implications than the effect on Congress. Members of the Appropriations Committee said that their spending bills had been carefully constructed and that shifting money could stall projects that both they and federal agencies including the Pentagon had deemed necessary. And they fear consolidating too much power in the hands of a president.
“It is inconsistent with the U.S. Constitution because, after the American Revolution against a king, our founders chose not to create a chief executive with the power to tax the people and spend their money any way he chooses,” said Senator Lamar Alexander, Republican of Tennessee.
“This is a fundamental constitutional responsibility of Congress,” said Ms. Collins. “We should be opposing this strongly.”
There is a small chance that Mr. Trump will accept a list of existing programs, compiled by Mr. Alexander, that Republicans believe could be used for wall money, rendering the emergency declaration moot. But nobody is holding out much hope that will happen.
Ms. Capito said she would spend the holiday weekend weighing what to do next. She encouraged Mr. Trump to do the same.
“He’s got to ask himself, ‘What are the ramifications of what I’m doing?’” she said. “If the resolution comes from the House to the Senate, where are those votes going to fall? What does that do to my momentum? He’s got to be considering that, I’m certain. Maybe he’s willing to take whatever could happen, maybe that’s not bothering him.”