WASHINGTON (AP) — The Republican-led Senate is set to deal President Donald Trump a rebuke on his declaration of a national emergency at the Mexican border, with the only remaining question how many GOP senators will join Democrats in defying him.

Republicans are predicting that Thursday’s showdown vote will result in Congress sending Trump a resolution blocking the border emergency he proclaimed last month to steer an extra $3.6 billion to building border barriers.

Since the Democratic-controlled House approved the measure last month, the Senate vote would force Trump to use a veto to protect his presidential campaign’s “Build the Wall” mantra over objections from his own party.

“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.”

Trump tweeted early Thursday about “the big National Emergency vote today” in the Senate, saying, “I am prepared to veto, if necessary,” and called the situation at the border “a National Security and Humanitarian Nightmare.”

Senate passage of the resolution was all but ordained Wednesday after the collapse of efforts by the White House and GOP senators to reach compromise on separate legislation by Sen. Mike Lee, R-Utah, limiting presidents’ powers to declare emergencies in the future.

Republican lawmakers had hoped a deal on that measure would have helped more of them to back Trump’s border emergency in Thursday’s vote. Instead, several Republicans are being boxed into a thorny dilemma: defy Trump and the conservative voters who back him passionately, or assent to what many lawmakers from both parties consider a dubious and dangerous expansion of presidential authority.

With Republicans controlling the Senate 53-47, just four GOP defections would be enough to approve the resolution canceling Trump’s border emergency.

Lee became the fifth Republican to say they’d back the resolution after Trump called him during a private lunch of GOP senators to say he opposed Lee’s compromise bill. The call was described by two officials who weren’t authorized to discuss the matter publicly and described it on condition of anonymity.

Soon afterward, Lee issued a statement saying he’d support the resolution blocking the border emergency.

“Congress has been giving far too much legislative power to the executive branch,” Lee said. He said he’d vote to block Trump’s emergency because his own bill “does not have an immediate path forward.”

The other GOP senators who have said they will vote to block Trump’s border emergency are 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 said Wednesday that his vote was “still a work in progress” as talks with the White House continued. But perhaps 15 GOP senators might oppose Trump in Thursday’s vote, said one Republican who offered the estimate only on condition of anonymity.

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

Any Republican hopes of a turnabout rested largely on a familiar phenomenon of the Trump administration — an abrupt 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.

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.