US President Donald Trump has declared a national emergency in a bid to fund his promised wall at the US-Mexico border without congressional approval, an action Democrats have vowed to challenge as a violation of the US Constitution.

The Republican president's move to circumvent Congress represented an escalation in his efforts to make good on a 2016 presidential campaign pledge to build a wall to halt the flow into the country of illegal immigrants, whom Mr Trump says bring crime and drugs.

He also signed a bipartisan government spending bill that would prevent another partial government shutdown by funding several agencies that otherwise would have closed on Saturday.

The funding bill represents a legislative defeat for him since it contains no money for his proposed wall - the focus of weeks of conflict between him and Democrats in Congress.

Mr Trump made no mention of the bill in rambling comments to the media in the White House's Rose Garden.

He had demanded that Congress provide him with $5.7 billion in wall funding as part of legislation to fund the agencies.

That triggered a historic, 35-day December-January government shutdown that hurt the US economy and his opinion poll numbers.

By reorienting his quest for wall funding toward a legally uncertain strategy based on declaring a national emergency, Mr Trump risks plunging into a lengthy legislative and legal battle with Democrats and dividing his fellow Republicans, many of whom expressed grave reservations about the president's action.

Fifteen Democrats in the Republican-controlled Senate introduced legislation on Thursday to prevent Mr Trump from invoking emergency powers to transfer funds to his wall from accounts Congress has already committed to other projects.

Nancy Pelosi, the Democratic speaker of the House of Representatives, and top Senate Democrat Chuck Schumer swiftly responded to Mr Trump's declaration.

"The president's actions clearly violate the Congress’s exclusive power of the purse, which our Founders enshrined in the Constitution," they said in a statement.

"The Congress will defend our constitutional authorities in the Congress, in the courts, and in the public, using every remedy available."

New York state's attorney general, Letitia James, said her office would also challenge Mr Trump in court. California's governor, Gavin Newsom, also pledged to file suit.

"We won't stand for this abuse of power and will fight back with every legal tool at our disposal," Ms James wrote on Twitter.

The president acknowledged that his order would face a lengthy court fight.

"I expect to be sued. I shouldn't be sued ... We'll win in the Supreme Court," Mr Trump predicted.

Mr Trump may have also undermined his administration's argument about the urgency of the situation, when he told reporters, "I didn't need to do this. But I'd rather do it much faster."

Both the House and the Senate could pass a resolution terminating the emergency by majority vote.

However, that measure would then go to the president, who would likely veto it. Overriding the veto would require a two-thirds vote in both chambers.

Mr Trump says a wall is needed to curb illegal immigrants and illicit drugs coming across the border.

But statistics show that illegal immigration via the border is at a 20-year low and that many drug shipments come through legal ports of entry.

Confronted with those statistics at the Rose Garden event with reporters, Mr Trump said they were "wrong."

Also present were a half-dozen women holding poster-sized pictures of family members killed by illegal immigrants. Mr Trump cited their presence in announcing the emergency declaration.

Mr Trump estimated his emergency declaration could free up as much as $8 billion to pay for part of the wall. Estimates of its total cost run as high as $23 billion.

As a candidate, he repeatedly promised Mexico would pay for the wall. It was one of his biggest applause lines at his campaign rallies. Mexico firmly refused to pay, and now Mr Trump wants US taxpayers to cover the costs.