WASHINGTON (Reuters) - U.S. President Donald Trump stormed out of talks with Democratic congressional leaders on Wednesday over funding for a border wall with Mexico and reopening the government, complaining the meeting at the White House was “a total waste of time.”

On the 19th day of a partial government shutdown caused by the dispute over the wall, a short meeting that included Trump, House of Representatives Speaker Nancy Pelosi and Senate Democratic leader Chuck Schumer ended in acrimony with no sign of a resolution.

“Just left a meeting with Chuck and Nancy, a total waste of time,” Trump wrote on Twitter. “I asked what is going to happen in 30 days if I quickly open things up, are you going to approve Border Security which includes a Wall or Steel Barrier?” Trump wrote. “Nancy said, NO. I said bye-bye, nothing else works!”

Exasperated Democrats called Trump’s behavior a “temper tantrum” and said the meeting broke down when they refused to commit to funding his proposed southern border wall. Trump’s desire for a wall between the United States and Mexico was a central theme of his 2016 presidential campaign.

“It was a petulant president of the United States,” Pelosi told reporters when she returned to the Capitol. “A person who would say: ‘I’ll keep government shut down for weeks, months or years unless I get my way.’ That’s just not the way democracy works, and so it’s very sad.”

Schumer said Trump had had “a temper tantrum.” The lawmaker told reporters: “That is sad and unfortunate. We want to come to an agreement. We believe in border security. We have different views.”

The breakdown in talks could strengthen the possibility that Trump will declare a national emergency to build a wall on the southern border if no deal with Congress can be reached on his request for $5.7 billion for the project.

Earlier on Wednesday, Trump said he had the authority to declare a national emergency that would let him pay for the wall with military funds. Vice President Mike Pence told reporters Trump was still considering that option.

Asked what Trump had gained by walking out, Pence said: “I think the president made his position very clear today: that there will be no deal without a wall.”

Shortly after the White House meeting broke up, the Democratic-controlled House of Representatives passed legislation to end a partial shutdown of the Treasury Department and some other agencies that have been closed since Dec. 22, without money for the wall.

But there was no indication that the Senate, controlled by Trump’s fellow Republicans, would allow a vote on the bill.

Democrats are eager to force Republicans to choose between funding the Treasury’s Internal Revenue Service - at a time when it should be gearing up to issue tax refunds to millions of Americans - and voting to keep it partially shuttered.

In a countermove, the Trump administration said that even without a new shot of funding, the IRS would somehow make sure those refund checks get sent.

Slideshow ( 19 images )

The National Treasury Employees Union filed suit on Wednesday challenging the administration’s authority to force federal employees to work without pay.

Trump attended a lunch meeting of Senate Republicans on Wednesday and emerged to declare unwavering support for the tough stance he has taken on funds for the wall.

Asked if he got the impression in the meeting that the shutdown would end soon, Republican Senator Tim Scott said: “I did not. I think we’re going to be here a while.”

Slideshow ( 19 images )

DEMOCRATIC TACTICS

Pelosi plans more votes this week that one by one would provide money to operate departments ranging from Homeland Security and Justice to State, Agriculture, Commerce and Labor.

Able to get the bills through the House because of the Democratic majority, Pelosi is hoping some Senate Republicans back her up and abandon Trump’s wall gambit.

The political maneuvering comes amid a rising public backlash over the suspension of government activities that has resulted in the layoffs of hundreds of thousands of federal workers.

Other “essential” employees are being required to report to work, but without pay for the time being.

On Thursday, Trump travels to the border to highlight what he calls an immigration “crisis.” He delivered his first prime-time television address from the Oval Office on Tuesday to make his case for the border wall.

The funding fight stems from Congress’ inability to complete work by a deadline last September on funding all government agencies. It did, however, appropriate money for about 75 percent of the government on time - mainly military and health-related programs.

U.S. airport security workers and air traffic controllers working without pay have warned that security and safety could be compromised if the shutdown continues, but the Trump administration said staffing was adequate and travelers had not faced unusual delays.

Union officials said some TSA officers had already quit because of the shutdown and many were considering quitting.

Ratings agency Fitch warned that it could cut the U.S. triple-A sovereign debt credit rating later this year if the shutdown proves prolonged and Congress fails to raise the legal limit on the national debt in a timely manner.