(CNN) Donald Trump 's hatred of looking foolish and Democrats' conviction that they have a winning hand is leaving the President with no way out of the stalemate over his border wall.

That means hundreds of thousands of federal workers, in limbo in a government shutdown that is within days of becoming the longest on record, are about to pay a heavy price when their paychecks don't arrive as normal on Friday

Far from moving toward a resolution, the shutdown, which started in the old Republican Congress and has stretched into the new Democratic House majority, is becoming more intractable by the day.

On Wednesday, in talks with top congressional leaders, Trump lived up to a tweet he fired off nearly eight years ago: "'Know when to walk away from the table.' The Art of the Deal."

He stormed out of the White House Situation Room after House Speaker Nancy Pelosi declined to finance the border wall that the President didn't manage to get funded when the GOP held the purse strings.

"Just left a meeting with Chuck and Nancy, a total waste of time," Trump tweeted shortly after the meeting broke up.

"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 collapse of the talks left Trump's strategy for extricating himself from the shutdown with a much needed political victory, a mystery.

It cast further doubt on the President's claim to be the ultimate deal-maker and offered a glimpse into a power struggle between the President and the speaker that could define the nation's politics over the next two years.

For Trump's dramatic gesture on Wednesday to succeed, Democrats would have to need an end to the government shutdown more than the President -- and would come back with a fresh enticement for him to do a deal.

But there is no reason to believe Democrats are anywhere near folding, a factor that is making life even more difficult for a President and White House team that is learning how frustrating divided government can be.

CNN's Kaitlan Collins and Boris Sanchez reported Thursday that it was increasingly possible that Trump could declare a national emergency on the border and declare victory by reprogramming Pentagon funds to build the wall.

The move could offer one way out of his dead end. Trump could sign bills to reopen the government then blame a court system he has long said is stacked against him should his use of executive power be blocked by a judge. A prolonged legal battle could be one way of showing his most loyal supporters he has not given up the fight.

But to most other observers, Trump would still look like he came off second-best in the first battle of Washington's new balance of power.

No deal in sight

White House officials say that the administration is increasingly frustrated with the refusal of Democrats to make a deal. But it's unclear what Trump is offering Pelosi and her new majority in return for fulfilling his central campaign promise.

His efforts to hang the blame on the speaker for -- to use a term the President repeated often in an Oval Office address Tuesday night -- a crisis on the southern border with criminals pouring into the country, seem not to have worked.

But it's becoming clear how much Trump needs a win on the issue that bound him to his faithful political supporters more than anything else, especially with the grave threat posed by special counsel Robert Mueller ever more evident.

In a moment of candor at the White House on Wednesday, Trump explained the political considerations that have led him to his dead end.

"Right now, if I did something that was foolish, like gave up on border security, the first ones that would hit me are my senators. They'd be angry at me," the President said at the White House.

"The second ones would be the House. And the third ones would be, frankly, my base and a lot of Republicans out there."

Last week, CNN reported that the President told Schumer he would look "foolish" if he reopened the government before securing money for his wall.

A source familiar with what happened in the Situation Room on Wednesday told CNN's Phil Mattingly that the top Senate Democrat asked Trump, "Why don't you open the government and stop hurting people?"

The President answered, "Because then you won't give me what I want," before ending the meeting by saying "bye, bye," and heading out the door (a White House official disputed that version of events to CNN later on Wednesday).

It was a classic slice of Trumpism that may have been satisfying in the moment and was surely popular with supporters who appreciate the President's blunt manner and willingness to shatter protocol.

But Trump's histrionics drove him deeper into a no-win situation at exactly the point when the political pressure is ratcheting up. There seems to be a real chance that the President could end up shouldering most of the blame.

House Democrats are about to start voting to reopen government agencies in a strategy designed to squeeze Senate Republicans and paint the President as unwilling to offer the basics of government.

It's possible that the spectacle of hundreds of thousands of federal workers missing paychecks, and struggling to pay for mortgages and other expenses, could complicate the shutdown narrative for the White House. After all, last year Trump said in a clash with Democratic leaders in the Oval Office that he would be "proud" to shut down the government over the wall.

Without judging the merits of Trump's argument, it is becoming increasingly hard to see how the President can escape this fight and not be seen as the loser.

The White House needs something to happen that would change the politics of the situation, and would put the onus on Democrats, who think they have the upper hand, to solve it.

But heading into the shutdown, a Quinnipiac University poll found that 62% of voters opposed shutting down government over the wall. Only 34% supported the idea.

Pelosi, meanwhile, can use her stand against Trump to solidify her majority, which believes it was sent to Washington to check the President, behind her.

A GOP way out?

If any party is getting cold feet on the shutdown, it's the Republicans. There are increasing rumblings in the Senate that some members would like to reopen the government before settling the dispute over the wall. Trump pointedly sought to dispel such doubts Thursday morning, claiming there was "GREAT unity" among his party.

Still, while there are signs of nervousness in his caucus, Senate Majority Leader Mitch McConnell is playing a waiting game and is not yet at the point of breaking with the President.

On Wednesday night, however, it emerged that some Republicans have started a private effort to find a way out for the President from his damaging dead end.

The long-shot idea is an immigration deal that would get Trump $5.7 billion for his border wall in return for several wins for Democrats, including action to protect undocumented migrants brought to the US illegally by their parents.

CNN's Manu Raju reported that GOP senators pitched the idea to senior White House adviser Jared Kushner, who said if they came up with a proposal that got Trump his border wall money and could pass the Senate, the White House would be open to more discussions on the matter. A source did not say whether Trump would back the plan.

While the President is in an apparently weak position, he is running through a repertoire of power plays to somehow reshape the nation's thinking on the wall and to force the Democrats to cave.

He tried an Oval Office address. He staged his walkout. On Thursday, he will head to the border region he says is in crisis. But it's not clear anything is changing the shutdown politics.

But Pelosi, reflecting her confidence that she will not pay as steep a political price as the President for the showdown, took a deeply personal jab at the source of his wealth by accusing him of indifference to the plight of government workers who are not getting paid.

"He thinks maybe they could just ask their father for money, but they can't," Pelosi said.