US President Donald Trump stormed out of negotiations on funding a US-Mexico border wall when Democratic opponents said they would not agree to the project.

"A total waste of time," Mr Trump tweeted about his White House meeting with top Democratic congressional leaders. "I said bye-bye, nothing else works!"

Chuck Schumer, the top Democrat in the Senate, told journalists: "Again, we saw a temper tantrum because he couldn't get his way.

"The president just got up and walked out."

The two sides agreed that the meeting ended abruptly soon after starting, but not on who was to blame.

According to supporters of Mr Trump at the meeting, the president began by asking Democratic leaders whether they would agree to fund his wall project in exchange for him ending a painful shutdown of swaths of government, which he has instigated in retaliation for the standoff.

The Democratic speaker of the House of Representatives, Nancy Pelosi, "raised her hand and said no, not at all," said Kevin McCarthy, the senior Republican in the House.

"We heard once again that Democratic leaders are unwilling to even negotiate," Vice President Mike Pence said.

He insisted that Mr Trump came in good faith. 

"The president walked into the room and passed out candy," Mr Pence said. "I don't recall him ever raising his voice or slamming his hand."

However, Mr Schumer said Mr Trump was the one who was intransigent.

The president "sort of slammed the table" and left, Mr Schumer said. "Again, we saw a temper tantrum because he couldn't get his way."

Read more

Mr Trump wants $5.7 billion to fund a wall he says is needed to keep out dangerous illegal immigrants, drug dealers and people smugglers from Mexico.

Democrats say the wall would have little impact on real border problems and that Mr Trump's tough approach has instead created a humanitarian crisis among vulnerable, unthreatening migrants.

Mr Trump's main lever to exert pressure on Congress has been to refuse signing spending bills that cover large areas of government.

As a result, some 800,000 federal employees and many more contractors have now been without pay for almost three weeks.

Democrats insist they will not lift their opposition to the wall project and believe Americans will tire of the shutdown chaos and blame Mr Trump.

But Mr Trump indicated today on a visit to Republican allies in Congress that he will continue to play hardball.

"Whatever it takes," he told journalists, when asked how long the shutdown could continue.

Earlier at the White House, Mr Trump told journalists that if he cannot get his way, he could declare a national emergency -- a measure that allows him to bypass Congress and take the wall funds he needs from the military.

"I think we might work a deal, and if we don't, we might go that route," he said, insisting he has the "absolute right" to declare an emergency, despite warnings in Congress that this could be seen as serious presidential overreach.

Mr Trump's triumphant 2016 campaign relied heavily on his "build the wall" slogan and since then, he has pushed the idea that the United States is being overwhelmed by dangerous migrants who enter the country illegally.

But with Democrats winning control of the House in November midterm elections, Mr Trump's wall push has come up against a wall of its own.

This week, an increasingly frustrated president is trying to seize the initiative.

Tomorrow, he will fly down to the southern border that he described in a prime-time television speech last night as an open door to murderers and other criminals.

"How much more American blood must we shed before Congress does its job?" Mr Trump said.