Updated

President Trump walked out of a White House meeting with congressional leaders Wednesday afternoon over the partial government shutdown after House Speaker Nancy Pelosi again rejected supporting new funding for a border wall, according to those in the meeting.

Speaking to reporters after the brief session, Senate Minority Leader Chuck Schumer, D-N.Y., said the “president just got up and walked out."

“He asked Speaker Pelosi, ‘will you agree to my wall?’ She said no. And he just got up, and said, 'Well we’ve got nothing to discuss,'" Schumer said.

The president, in a tweet, called the meeting “a total waste of time” and appeared to confirm that he left after Pelosi's answer.

“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!” Trump tweeted.

Pelosi, D-Calif., said after the meeting that the president was “petulant." Schumer said Trump slammed his hand on a table in frustration, but Vice President Mike Pence and other Republicans, speaking to reporters afterward, denied that happened.

House Minority Leader Kevin McCarthy said the president was willing to make a deal in the meeting.

"I just listened to Senator Schumer,” McCarthy, a California Republican, said. “I know he complained the time that you had cameras in the meeting. I think we need to bring them back. Because what he described the meeting to be is totally different than what took place."

The meeting in the Situation Room on Wednesday afternoon came ahead of Trump’s planned trip to the Texas-Mexico border on Thursday. Earlier, the president traveled to Capitol Hill to meet with Senate Republicans, saying afterward, “We have a very unified party.”

AS TRUMP HEADS TO BORDER, DEMS DOUBLE DOWN ON ‘MANUFACTURED CRISIS’ CLAIM

Still, a growing number of moderate Republicans - like Susan Collins of Maine and Cory Gardner of Colorado -- have appeared uncomfortable with the toll the partial shutdown is taking.

Trump has said he might declare a national emergency and try to authorize the wall on his own if Congress won't approve the $5.7 billion he's asking.

"I think we might work a deal, and if we don't I might go that route," he said.

TRUMP SAYS HE HAS 'ABSOLUTE RIGHT' TO DECLARE NATIONAL EMERGENCY OVER BORDER SECURITY

Past meetings with Democrats have resulted in both sides digging in, with Trump insisting on nearly $6 billion for a border wall and Democrats saying they won’t entertain the discussion until Congress passes and Trump signs a package re-opening shuttered federal agencies.

The president’s prime-time address on Tuesday night saw both camps drifting even further apart, with Trump declaring a “humanitarian and security crisis" and vowing to protect America, “so help me God” – and Democratic congressional leaders saying Trump was working to “manufacture a crisis, stoke fear and divert attention from the turmoil in his administration."

How the two sides will bridge this difference – and how long they will resist a compromise – has been unclear. The mounting impact of the partial shutdown, including federal workers' paychecks and national parks services, is likely to increase pressure on Congress and the White House to forge a deal in the coming days.

CLICK HERE TO GET THE FOX NEWS APP

Trump told congressional leaders the standoff could last months, even years, as he demanded Washington take action to stem the flow of illegal immigrants, drugs and criminals crossing the border.

Fox News’ Judson Berger and The Associated Press contributed to this report.