WASHINGTON – President Donald Trump walked out of a negotiating meeting with congressional leaders Wednesday and said he might declare a national emergency at the border after Democrats refused to yield to his demands for money for a border wall.

Senate Minority Leader Charles Schumer, D-N.Y., said Trump abruptly ended the White House session after House Speaker Nancy Pelosi, D-Calif., said she did not support his border wall.

"He just got up and said we have nothing to discuss, and he walked out," Schumer said. "He just walked out of the meeting.”

Schumer called Trump's behavior "unbecoming of a president."

Vice President Mike Pence and Republican lawmakers disputed the Democrats’ account and said the meeting ended after Democrats refused to offer a counterplan to reopen the government.

Trump gave Schumer and Pelosi the floor to state their case, but “they want to argue,” said House GOP leader Kevin McCarthy, R-Calif.

Trump treated the Democrats politely, McCarthy said, but they reacted with "embarrassing" behavior.

Trump confirmed that he walked out of the session, writing on Twitter, "Just left a meeting with Chuck and Nancy, a total waste of time. 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? Nancy said, NO. I said bye-bye, nothing else works!"

The end of what was supposed to be a new round of bipartisan talks came on the 19th day of a partial government shutdown – the second-longest in history – that was triggered by Trump’s demands for $5.7 billion to build a wall along the U.S.-Mexican border and Democrats' refusal to give him the money.

Earlier Wednesday, Trump said he was still considering declaring a national emergency on the border if negotiations with Democrats fail to yield a deal on funding for the wall.

“I think we might work a deal (on the government shutdown), and if we don’t, I may go that route," he said. "I have the absolute right to do (a) national emergency if I want. … My threshold will be if I can’t make a deal with people that are unreasonable.”

An emergency declaration theoretically would allow Trump to use military money to build the wall. Democrats and some Republicans have questioned the legality of such a move, saying an emergency declaration would be challenged in court.

Before Wednesday’s failed bipartisan meeting, Trump and Pence traveled to the Capitol for a closed-door luncheon with Senate Republicans.

Afterward, Trump reiterated that he might pursue a national emergency declaration to get funding for his wall if Democrats "don’t agree with the fact that our country really has problems with crime.”

Trump portrayed a sense of unity among Republicans, though some have suggested opening portions of the government while negotiations over the wall continue.

“There was no discussion about anything other than solidarity,” Trump said. “The Republicans are totally unified.”

Senate Majority Leader Mitch McConnell, R-Ky., also stressed that Republicans remain solidly behind Trump in the budget standoff. But at least three GOP senators – Cory Gardner of Colorado, Susan Collins of Maine and Lisa Murkowski of Alaska – have publicly said the Senate should at least consider a House plan to reopen the government.

“The operations of the Department of Interior and the National Park Service or the operations of the IRS and whether or not tax refunds go out don’t have anything to do with border security,” Murkowski said Tuesday. "So let's bifurcate these issues. Let’s set them aside. Let’s allow for the operations, these governmental functions in these six other departments, allow for them to continue.”

The House of Representatives voted 240-188 Wednesday to approve a bill that would fund the Treasury Department and the IRS so Americans' tax refunds wouldn't be delayed because of the shutdown. Eight Republicans voted with Democrats to pass the bill.

The House will take up three bills to fund the remaining shuttered departments this week. None of the measures is likely to get a vote in the GOP-controlled Senate.

The White House threatened to veto all four bills, saying they are unacceptable without a broader agreement to address the situation on the border.

Contributing: Deborah Barfield Berry, Christal Hayes and Trevor Hughes