WASHINGTON — President Donald Trump will sign the budget deal that Congress is expected to send him later Thursday, but he’ll also declare a state of emergency at the southern border so he can fund his long-promised wall, Senate Majority Leader Mitch McConnell said.

The Senate is expected to overwhelmingly pass the bill, which contains $1.37 billion in funding for 55 miles of border fence, far short of the president’s requested $5.7 billion for the wall — which he'd long insisted Mexico would pay for.

"Trump is prepared to sign the bill and will also declare a national emergency," McConnell announced to his Senate colleagues around 3 p.m. Thursday after he tried and failed to rally the GOP around the measure in a closed-door lunch mere hours earlier.

House Speaker Nancy Pelosi quickly responded, challenging the notion that an emergency exists at the border and accusing the president of going around Congress to fund the wall.

“First of all, it's not a national emergency; it is a humanitarian challenge to us,” Pelosi said. “The president is making an end run around Congress.”

Moreover, she said, the president should consider how future presidents might use states of emergency.

“If the president can declare a state of emergency on something he created, just think what a president with different values could declare as an emergency,” she said. She pointed out that Thursday is the one-year anniversary of the school shooting in Parkland, Florida, that killed 17, and suggested that gun violence is a crisis more worthy of a state-of-emergency declaration.

Many Republicans were hesitant to vote on the measure while Trump was still holding out the possibility of a veto. In December, the Senate passed a budget deal unanimously, expecting Trump to sign it, only to have him refuse, in a move that led to the longest government shutdown in U.S. history.

“I’d like to know what the president thinks. Why are we going through all of this if he’s going to veto the bill?” Sen. John Kennedy (R-La.) told VICE News as he headed to the GOP lunch. “I don’t mind walking the plank. I just want to know what I’m jumping into.”

And for most Democrats, a president declaring a state of emergency in order to move funds over a political impasse would set a dangerous precedent for the executive branch.

“I don’t think that’s a smart thing long-term at all,” Sen. Jon Tester (D-Mont.) told VICE News at the Capitol. “I think it sets a standard for declarations of emergencies that just about anything could fit into. And he isn’t going to be the president forever. And I think it takes away power from the legislative branch, so it’s a failure on all sorts of fronts.”

Some Republicans are also nervous the president is overriding the explicit will of Congress when it comes to funding the wall, with some fearing he may go after money earmarked for their own projects.

“I’d like to know which ones they’re talking about, and the devil's in the details. What are you taking money from?” Sen. Ron Johnson (R-Wis.) told VICE News just off the Senate floor. “Listen, I think there’s probably all kinds of lower-priority spending, but I’m not sure that’s the type of money that’s really available here.”

But as another shutdown appears to have been averted, it seems unlikely Trump and his hard-line supporters are going to back down from the dispute over the wall. Some senior Republicans have been urging the president for weeks to declare an emergency or find other ways to move money around.

“The president’s got power — all presidents have. He can do more than just what we’re doing,” Senate Appropriations Chair Richard Shelby told a flock of reporters in the basement of the Capitol Thursday.

But some Democrats say his declaration will simply move the dispute to the courts and it could drag out for months, or even years.

“There are some basic principles: When Congress appropriates money, that’s the law. If the money is reprogrammed, the law is violated,” Sen. Richard Blumenthal (D-Conn.), a former prosecutor and attorney general, told VICE News just off the Senate floor. “The courts should stop it ,whether it’s the president or anyone else who illegally uses that money.”