President Donald Trump, in a fit of pique after his State of the Union address was put on ice, grounded House Speaker Nancy Pelosi on Thursday hours before she was to jet off to Afghanistan on a government aircraft.

The escalating cycle of one-upmanship risked leaving America's two most powerful political leaders looking juvenile and oblivious as 800,000 government workers lament empty wallets and airports set up food banks for security staff.

Yet the building clash between the President and the speaker -- which saw Trump storm out of White House talks with a parting shot of "Bye-bye" last week -- is more than a personal grudge match.

While it appears trivial, the confrontation is effectively the first battle in an era-defining duel that could decide the fate of the Trump presidency.

The President badly needs to win the first face-off with the leader of a new Democratic-led House that must already have him dreaming of the lost days of a tame Republican power monopoly on Capitol Hill. With special counsel Robert Mueller closing in and a re-election race looming, he badly needs his base. And his base badly wants his wall.

Pelosi has no desire to cave in her first engagement with Trump. She has an advantage in that she's been toe-to-toe with a Republican President before, during her first spell running the House opposite George W. Bush.

The speaker is a veteran Washington hand and, as her crushing of a Democratic revolt after the midterm elections showed, she understands her power and knows how to use it more effectively than a President who is a still a relative political novice.

And more than that, Pelosi is getting under Trump's skin and seems intent on goading him into counterproductive lashing out.

The eye-for-an-eye skirmishing is certainly undignified.

Sen. Lisa Murkowski surveyed the political game playing Thursday and concluded that after 27 days, the public would soon have enough.

"They say ... 'You may not like one another but when are you going to figure out how to work together?' " the Alaska Republican said.

Sen. Lindsey Graham, a South Carolina Republican who's usually a staunch Trump ally, said: "One sophomoric response does not deserve another."

Trump thinks he's winning the shutdown

Trump has been frustrated by the tone of shutdown coverage, asking why it seemed Democrats had the upper hand, when in his view he is winning the standoff, CNN's Kaitlan Collins reported Thursday.

The White House felt wrong-footed after Pelosi released a letter Wednesday calling for Trump to reschedule his big TV moment -- the State of the Union address on January 29 -- because of the partial government shutdown.

Thursday's glimpse into the West Wing was revealing because it suggests that the President believes he is heading for victory in the shutdown even though most outside analysis and evidence suggests Pelosi is coming out ahead.

One Trump adviser told CNN's Jim Acosta that the President believed Pelosi would eventually fold in their "King Kong vs. Godzilla" face-off.

But most polling shows that Americans blame the President for initiating a shutdown that he had said on television before Christmas he would be "proud" to own. And a majority of the public still opposes his border wall.

Trump also failed to turn the political tide with an Oval Office address and a trip to the border on Air Force One.

The White House has been making a fair point that Pelosi has not shown any sign of bending in the talks, either. But it has failed to capitalize on what some observers saw as an error by the speaker when she described a border wall as an "immorality" -- language that might jar with conservative Democrats.

Thursday's events offered hints as to why Trump may in the end regret walking into this confrontation.

In a letter to Pelosi, in which his glee at one-upmanship jumped off the page, the President told the speaker he was "sorry to inform you that your trip to Brussels, Egypt, and Afghanistan has been postponed."

It was the kind of unpredictable coup that Trump's supporters love and that burnishes his image as a slayer of establishment protocol.

Yet while his strike against Pelosi was immediately celebrated by his pundit cheerleaders on Twitter, it was characteristically Trumpian in that while it felt good at the time, it appeared strategically suspect in the longer term.

If Trump had any moral high ground following Pelosi's stifling of the State of the Union address, it quickly crumbled after he canceled her trip.

After all, the speaker had been poised to lead a delegation of US lawmakers to meet troops serving in a war zone that Trump has yet to visit, allowing Democrats to paint the President as hardhearted and blocking congressional oversight of the war.

In a questionable flexing of his powers as commander in chief, Trump had shattered security protocols requiring that details of a senior official's travel to Afghanistan, where insurgents and terrorist groups are active, to be kept secret until they land.

On Friday, Pelosi said that she and her delegation had arranged to travel by commercial planes after the President canceled their military transport but that Trump's intervention and what she said was a "leak" from the White House about their new travel plans caused them to shelve the trip for safety reasons.

"We weren't going to go because we had a report from Afghanistan that the President, outing our trip, had made the scene on the ground much more dangerous because it's a signal to the bad actors that we're coming," Pelosi said.

"You never give advanced notice of going into a battle area. You just never do. Perhaps the President's inexperience didn't have him understand that protocol. The people around him though should have known that," said Pelosi.

Amanda Carpenter, a former senior communications adviser to GOP Sen. Ted Cruz of Texas, said it wasn't clear that the White House could turn its retaliation against Pelosi into a breakthrough in the shutdown stalemate.

"They cannot solve the problem, so it's much easier to play petty, partisan politics. This is a move that will be effective at convincing the base that they are yet again owning the libs, but show me how it gets you to a deal," Carpenter said on CNN's "The Lead with Jake Tapper."'

He faced charges of hypocrisy since the Air Force had flown him to his first visit as President to a war zone -- in Iraq -- in December, when the shutdown was in its early days.

Trump's remark that Pelosi could fly commercial came across as irresponsible given that she is second in line to the presidency, after the vice president. And his use of the word "excursion" suggested he views trips to the troops as PR stunts.

An unfavorable media reaction to his jab at Pelosi on Thursday may have prompted Trump to quickly cancel a planned trip by his high-powered delegation of Cabinet officers to the World Economic Forum, a gathering of the world's globalist elite in Davos, Switzerland, in the next few days.

The trip, which Trump himself had originally been expected to lead, deprived his administration of a chance to wallow in the glory of the strong US economy among some of his most committed critics in Europe.

'Fifth-grade behavior'

Trump's cancellation of Pelosi's trip also offered an open invitation to Democrats to claim political points by slamming him as "petty" and "small," lacking the dignity required of a President.

"I can say that all too often in the last two years the President has acted like he is in the fifth grade," said Rep. Adam Schiff of California. "To have someone who has that kind of character running the country is an enormous problem at every level."

Generally, enemies who take on Trump directly tend not to prosper, since there is no one better at knuckle-duster politics than the President -- as a supposedly golden generation of GOP candidates found out in 2016.

Pelosi, though, has been picking her spots. It often seems she takes personal shots at the President to goad him into ill-considered retaliation.

In a shot at Trump's claim to be a self-made billionaire after failed White House shutdown talks, she said federal workers lacking paychecks could not "just ask their father for more money."

Last month, after tense Oval Office talks, Pelosi mocked the President's tough guy image by telling Democrats the wall is "like a manhood thing for him, as if manhood could ever be associated with him."

Republicans have long seen Pelosi -- who they delight in branding as a rich, radical liberal and a hypocrite -- as a poor-polling liability for Democrats, especially in tight congressional races in territory that favors conservatives.

But so far in the new era of divided Washington government, she seems more at ease than the President.

And their clashes, which predate a rigorous effort by Democratic committee chairs to expose what they believe is corruption, incompetence and possibly illegality at the heart of the administration, appear like the opening salvos of a calculated bid to lure the President to his own political destruction.

Trump needs to dig deep to turn the tables.