The House voted Thursday night to approve a border security deal that prevents a new government shutdown in a 300-128 vote.

The vote sets up President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE to sign the legislation — and to declare a national emergency as a way of getting more federal funds for his wall on the Mexican border.

ADVERTISEMENT

The House-passed legislation falls far short of Trump's demand for $5.7 billion for a wall on the Mexican border, and Trump is likely to sign the legislation somewhat reluctantly.

Conservative pundits have lambasted the deal worked out by appropriators, and the House Freedom Caucus on Thursday night largely voted against it.

Fox News host Laura Ingraham said in a string of tweets that Trump “must not” sign the legislation. And a group of conservative members sent a letter to Trump urging him to take executive action should he feel the need to sign the bill.

Both parties lost votes from a sizable number of members from their respective parties who took issue with certain concessions in the bill, with 109 Republicans and 19 Democrats voting no.

The defectors were largely conservatives and progressive members. Only 87 Republicans voted yes.

Some conservatives were swayed to vote for the bill by Trump's plan to declare a national emergency, including GOP Rep. Matt Gaetz Matthew (Matt) GaetzLara Trump campaigns with far-right activist candidate Laura Loomer in Florida House to vote on removing cannabis from list of controlled substances The Hill's 12:30 Report: Sights and sounds from GOP convention night 1 MORE (Fla.).

Negotiators on both sides of the aisle said there were portions of the bill they weren't pleased with, but felt they ultimately came out with a fair compromise providing victories for both sides.

"While this bill falls short of what I'd like to see, it will provide our Customs and Border Patrol and Immigration and customs enforcement agents the tools necessary to continue combatting the threat we face," House Appropriations Ranking Member Kay Granger Norvell (Kay) Kay GrangerGOP women's group rolls out six-figure campaign for Ernst Bottom line Helping our seniors before it's too late MORE (R-Texas) said on the floor ahead of the vote.

House Appropriations Committee Chairwoman Nita Lowey Nita Sue LoweyTop House Democrats call for watchdog probe into Pompeo's Jerusalem speech With Biden, advocates sense momentum for lifting abortion funding ban Progressives look to flex their muscle in next Congress after primary wins MORE (D-N.Y.) had similar sentiments, saying they managed to "put politics aside and put the American people first."

But not all appropriators were satisfied with the outcome of the agreement. Rep. Tom Graves John (Tom) Thomas GravesRep. Tom Graves announces early retirement Democrat in race against Marjorie Taylor Greene drops out McEnany: Trump 'hasn't done deep dive' on anti-Muslim views of Loomer, Greene MORE (R-Ga.) said he had hoped for additional funding for the wall, adding he was dissatisfied with time allotted for members to review what was in the 1,000-plus page bill.

"I think it shows the inadequacy of this bill," he told The Hill of the need to declare a national emergency.

The legislation, which was released just before midnight on Wednesday, includes funding for the Department of Homeland Security (DHS), including $1.375 billion to build 55 miles of barrier in the Rio Grande Valley.

Congress passed the measure just one day before current funding was set to expire at midnight. Uncertainty over whether Trump would sign the bill lasted through early-afternoon, with members expressing concern they were at risk of a second partial government shutdown in two months.

The Senate passed the legislation in an 83-16 vote Thursday afternoon, shortly after Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellPelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Senate GOP aims to confirm Trump court pick by Oct. 29: report Trump argues full Supreme Court needed to settle potential election disputes MORE (R-Ky.) announced he had spoken to the president who was willing to support the measure. He also announced his support for Trump's decision to declare a national emergency in order to build a border barrier.

While Trump’s vow to declare a national emergency is being welcomed by conservatives, members on both sides of the aisle expressed concerns it could set a bad precedent.

“Declaring a national emergency would be a lawless act, a gross abuse of the power of the presidency and a desperate attempt to distract from the fact that President Trump broke his core promise to have Mexico pay for his wall,” Speaker Nancy Pelosi Nancy PelosiPelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare House lawmakers reach deal to avert shutdown Centrist Democrats 'strongly considering' discharge petition on GOP PPP bill MORE (D-Calif.) and Senate Minority Leader Chuck Schumer Chuck SchumerSenate Democrats introduce legislation to probe politicization of pandemic response Schumer interrupted during live briefing by heckler: 'Stop lying to the people' Jacobin editor: Primarying Schumer would force him to fight Trump's SCOTUS nominee MORE (D-N.Y.) said in a joint statement.

“It is yet another demonstration of President Trump’s naked contempt for the rule of law. This is not an emergency, and the president’s fearmongering doesn’t make it one.”

House Minority Leader Kevin McCarthy Kevin Owen McCarthyMcCarthy's Democratic challenger to launch first TV ad highlighting Air Force service as single mother Trump asked Chamber of Commerce to reconsider Democratic endorsements: report The Hill's Morning Report - Sponsored by The Air Line Pilots Association - White House moves closer to Pelosi on virus relief bill MORE (R-Calif.) said he supports Trump's decision to declare a national emergency.

"We face a humanitarian and national security crisis at the border that must be addressed and the President’s declaration is merely a statement of fact. With the declaration and other legal authorities, the President has access to important tools to take the steps necessary to secure the border."

The bill will keep the government funded through Sept. 30.