Senate Majority Leader Mitch McConnell (R-KY) said Thursday that President Donald Trump will sign legislation to prevent a second partial government shutdown and declare a national emergency to build a wall along the U.S.-Mexico border.

“He’s prepared to sign the bill, he will also be issuing a national emergency declaration at the same time,” McConnell said ahead of a Senate vote on a measure to keep the government running past the February 15 deadline.

The comprise measure keeps departments running through the fiscal year but without the $5.7 billion the president wanted for the border wall with Mexico.

Moments after McConnell’s remarks, White House press secretary Sarah Huckabee Sanders confirmed in a statement that the president will sign the funding bill and take executive action to build the wall. “President Trump will sign the government funding bill, and as he has stated before, he will also take other executive action – including a national emergency – to ensure we stop the national security and humanitarian crisis at the border. The President is once again delivering on his promise to build the wall, protect the border, and secure our great country,” Sanders said.

House Speaker Nancy Pelosi (D-CA) said Democrats “may” file a legal challenge if a national emergency is declared, saying she and other party leaders are reviewing their options. “I may, that’s an option. We will review our options,” she said when asked if Democrats will take legal action. “But it’s important to note that when the president declares this emergency, first of all, it’s not an emergency. What’s happening at the border is a humanitarian challenge to us. The president is trying to sell a bill of goods.”

Following Pelosi’s remarks, Sanders told reporters that the administration is “very prepared” for legal challenges, adding that “there shouldn’t be” any. “The president’s doing his job. Congress should do theirs,” she said.

The Democrat-controlled House is poised to pass the sweeping measure Thursday evening, and the Republican-led Senate is expected to approve as well. Bargainers formally completed the accord moments before midnight Wednesday night.

The product of nearly three weeks of talks, the agreement provides almost $1.4 billion for new barriers along the boundary. That’s less than the $1.6 billion for border security in a bipartisan Senate bill that President Trump spurned months ago, and enough for building just 55 miles of barricades, not the 200-plus miles he had sought.

Notably, the word “wall” — which fueled many a chant at Trump campaign events and then his rallies as president — does not appear once in the 1,768 pages of legislation and explanatory materials. “Barriers” and “fencing” are the nouns of choice.

The compromise would also squeeze funding for Immigration and Customs Enforcement, or ICE, in an attempt to pressure the agency to gradually detain fewer immigrants.

Speaking to reporters on Capitol Hill, House Freedom Caucus chair Rep. Mark Meadows (R-NC) warned “it would be political suicide” if the president backs the bill and does not seek money elsewhere to fund the wall.

The Associated Press contributed to this report.