An eleventh-hour rescue mission by Republican senators to stave off an awkward defeat for President Donald Trump on his declaration of a national emergency at the Mexican border, and to protect themselves from a politically dicey vote opposing him, seemed to collapse Wednesday.

The setback made it all but certain that defections from his own party will force Trump to cast what could be his first veto — on a struggle directly related to his signature issue of building barricades along the southwest border. It also left Republican senators facing a painful choice: defy a president who commands passionate loyalty from conservative voters or acquiesce to what many lawmakers from both parties consider a dubious and dangerous expansion of presidential authority.

After a closed-door lunch, GOP lawmakers predicted the Senate would approve a resolution Thursday annulling the emergency Trump has declared along the border. The Democratic-led House passed the legislation last month, meaning Senate assent would send it to Trump.

"It was called turn out the lights, the party's over," said Sen. John Kennedy, R-La., recalling a favorite refrain of "Monday Night Football" announcers when a game was out of reach. "Well, that's appropriate right now."

Republicans hoped Trump would support a separate measure curbing a president's powers to declare future emergencies. Had he done so, they thought, it would be easier for reluctant GOP senators to support the emergency Trump has proclaimed to steer $3.6 billion more than Congress has approved for barrier construction.

But during the GOP lunch, Trump called Sen. Mike Lee, R-Utah, chief sponsor of the bill limiting future emergency declarations, and told him he opposed that proposal. The call was described by two officials who weren't authorized to publicly discuss the matter and described it on condition of anonymity.

"There's been numerous efforts to engage with the vice president and the president, and the president's not persuaded that he should support it right now," said Sen. John Cornyn, R-Texas, who advises GOP leaders. "I don't know of any president that likes to give up power."

Lee said later in a statement that he will back the resolution canceling the border emergency because his own bill now lacks "an immediate path forward." That would make him the fifth Republican senator to oppose the border emergency — more than enough to send the resolution to the White House.

With Republicans controlling the Senate 53-47, it will take just four GOP defections to approve the measure, which the House passed last month.

Also saying they would oppose Trump's emergency declaration were GOP Sens. Thom Tillis of North Carolina, Susan Collins of Maine, Lisa Murkowski of Alaska and Kentucky's Rand Paul. Tillis and Collins face potentially competitive re-election fights in 2020.

Tillis, though, said Wednesday that his vote was "still a work in progress" as talks with the White House continued.

As many as 15 Republicans might vote to block Trump's emergency, said one Republican who offered the estimate only on condition of anonymity.

Any Republican hopes of a turnabout rested largely on a familiar phenomenon of the Trump administration — an unexpected change in mind, as he's done in congressional battles over health care and immigration.

Trump told reporters that he has advised GOP senators to "vote any way you want" on the resolution blocking his emergency declaration — but he added a warning.

"Anybody going against border security, drug trafficking, human trafficking, that's a bad vote," he said. Framing Thursday's vote that way seemed to be a message all but aimed directly at undecided GOP senators facing re-election races next year, of whom there are several.

Within the White House, there was concern about agreeing to a deal that may only limit the number of defections, said a senior administration official who was not authorized to speak publicly.

Trump had customs, border patrol and other officials reiterate his case about the need for a border wall during a meeting with senators Wednesday.

"He just said he wants people to support it because, as he said before, he thinks it's important because it's an emergency at the border," said Sen John Hoeven, R-N.D.

House Speaker Nancy Pelosi, D-Calif., tried making it even harder for uncertain Republicans to support Trump's border emergency. She said the House would never even consider the separate bill limiting future declarations by presidents, including Trump.

"Republican Senators are proposing new legislation to allow the president to violate the Constitution just this once in order to give themselves cover," Pelosi said in a statement. "The House will not take up this legislation to give President Trump a pass."

Under a four-decade old law, presidents have wide leeway in declaring a national emergency. Congress can vote to block a declaration, but the two-thirds majorities required to overcome presidential vetoes make it hard for lawmakers to prevail. Presidents have never before declared an emergency after Congress voted to deny them money for the same purpose.

Lee's proposal says a presidential emergency would last 30 days unless Congress votes to extend it. It would apply to future emergencies, but not Trump's current border emergency unless he seeks to renew it next year.

The strongest chance of blocking Trump's border emergency is likely several lawsuits filed by Democratic state attorneys general, environmental groups and others.

___

Associated Press writer Catherine Lucey contributed to this report.