The House has voted to pass a compromise bill on border security hours after the Senate overwhelmingly approved it, averting a second government shutdown in two months. The White House says President Trump will sign the bill and declare a national emergency to bolster border security beyond the funding provided in the bill.

The measure passed in both chambers by large bipartisan majorities — 83 to 16 in the Senate, and 300 to 128 in the House.

The bill passed in Congress only provides $1.375 billion for a border wall, far less than the $5.7 billion requested by Mr. Trump. In addition to funding border priorities at the Department of Homeland Security as a whole, the legislation includes funding for six other departments or programs that had not yet been approved.

Get Breaking News Delivered to Your Inbox

The president allowed a 35-day government shutdown, which saw 800,000 federal employees furloughed or working without pay, in an attempt to persuade Democrats to budge on wall funding.

"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," White House Press Secretary Sarah Sanders said in a statement Thursday. "The President is once again delivering on his promise to build the wall, protect the border, and secure our great country."

Mr. Trump had long floated the possibility of a national emergency, saying he would probably move forward with one if Congress failed to provide him with enough border wall funding.

"If this doesn't work out, I probably will do it, I would almost say definitely," the president said of a national emergency declaration when he visited the border in Texas last month.

However, some Republicans have already expressed opposition to calling a national emergency, saying it could set a precedent for a Democratic president to call a national emergency on a similarly broad issue.

"If elected president, how would Elizabeth Warren or Bernie Sanders use this precedent for a national disaster declaration to force the Green New Deal on the American people?" GOP Rep. Cathy McMorris Rodgers asked on Twitter ahead of the House vote Thursday.

Mr. Trump's decision to use executive action is also sure to meet legal challenges, something Republicans cautioned the president about in recent weeks.