President Donald Trump will declare a national emergency to get more funding to build his border wall with Mexico and sign spending legislation to prevent another government shutdown, the White House said on Thursday.

The President is once again delivering on his promise to build the wall, protect the border, and secure our great country," White House Press Secretary Sarah Sanders said in a statement.

She added he would "take other executive action - including a national emergency - to ensure we stop the national security and humanitarian crisis at the border".

The Senate approved the border security funding bill late on Thursday. It will be taken up by the Democratic-controlled House of Representatives and the Republican-led Senate before going to Trump.

Senate Democratic leader Chuck Schumer said on Thursday that if Trump declared a national emergency to build a border wall, he would be committing "a lawless act" and warned that Congress would take steps to stop him.

The bipartisan legislation would provide more than $300 billion to fund the Department of Homeland Security and eight other federal agencies. While the border bill would provide $1.37 billion in new money to help build 55 miles of new physical barriers on the border.

Building the border wall was one of Trump's key election promises but he has so far been unsuccessful in getting the necessary funding.

The US government had its longest partial shutdown lasting 35 days over Trump's December demand for $5.7 billion to help build a portion of the wall.