President Donald Trump’s heated on-air jostling with Senate Minority Leader Chuck Schumer (D-NY) and incoming House Speaker Nancy Pelosi (D-CA) in the Oval Office on Tuesday was supposed to be private. But the president, at the last minute, decided otherwise.

Trump was determined to avoid the humiliation that he endured after a White House dinner with the same duo last year, from which Schumer emerged to declare that the group had struck a deal to preserve legal status for undocumented immigrants who came to the country as children, in exchange for border-security measures—a deal Trump subsequently nixed. And so the president made a snap decision to not get spun again, ordering White House officials to invite the media in to witness the three leaders trying to hash out a government funding deal, three knowledgeable sources told The Daily Beast.

The result was a dramatic confrontation in which Trump managed to give Schumer and Pelosi exactly what they wanted—only, it was on national TV.

“I am proud to shut down the government for border security,” Trump declared. “I will take the mantle,” he added as Schumer grinned. “I will be the one to shut it down. I’m not going to blame you for it.”

For White House aides, it was another chaotic chapter in an administration filled with them. They had expected that Trump might bring in the cameras during Tuesday’s tete-a-tete, even though it had been formally listed as closed to the press on the daily White House schedule. But they had hoped, at least, that any media availability would take place after a closed-door session.

Forced to account for the unexpected fireworks, they and White House allies quickly moved to frame the encounter as a stroke of presidential genius.

“The vast majority of Republicans are willing to shut the government to get the wall built. So if you’re Trump and your first goal is to continue to solidify your base, it make sense,” former House Speaker Newt Gingrich, a veteran of shutdown fights and an informal Trump adviser, told The Daily Beast. “Presidents have the White House and Air Force One and they are comfortable. They can take the heat and they have a megaphone. And I do think that Trump is setting up for 2020 between an open-borders Democrat and the Trump position.”

On the Hill, some Republicans were supportive of Trump’s decision to make government funding contingent on the president’s demand for $5 billion for a border wall. A compromise must be reached by Dec. 21 to avoid a partial shutdown.

“I think he’s prepared to shut ‘er down, because he believes, as I do, that walls work. You can debate whether shutting it down is good or bad policy,” Sen. John Kennedy (R-LA) told The Daily Beast. “But I’ve watched the man, and I’ve talked to him about the issue.”

“If I were playing poker with him right now and I didn’t have the cards, I’d fold,” he added.

But others questioned the political prudence of Trump preemptively taking the blame for a government shutdown. “It wasn’t great,” said one top GOP aide who has been though several shutdown fights. “But he’s an unconventional president.”

Sen. Richard Shelby (R-AL), who as Senate Appropriations Committee chairman is in charge of the funding process, hinted that he too was a bit uneasy with the president’s posture, but pledged to charge forward with negotiations.

“The Democrats have shut down the government before and so have we—not just threatened to do it. The president is focused on the security of the borders. And I agree with him on that. It’s a question of how do we get there,” Shelby told The Daily Beast.

With just weeks to go before various government agencies run out of money, congressional aides from both parties said Trump’s decision to embrace a shutdown ups the chances that one will happen.

The White House meeting with Schumer and Pelosi was formally an attempt to begin talks about what type of funding package could be passed before the Christmas break and avoid a shutdown showdown.

But Democrats have also shown little desire to move off their offer, which includes roughly $1.6 billion in funding for border security—not a wall—and they’ve been emboldened by the sense that the political dynamics will only improve in their favor as the clock winds down on total Republican control of Washington. Trump has weeks left to work with a Republican-run House. If the government were to shut down past the New Year, he would then likely have to negotiate with Pelosi as speaker.

Tuesday’s meeting gave no indication that the parties would find an agreement any time soon, let alone that they could hold a constructive negotiating session together. Moments after it concluded, Pelosi returned to the Capitol and gloated to fellow Democrats that she and Schumer had gotten Trump to say that a shutdown would be “fully” his. She also took a poke at Trump’s insecurities.

“It’s like a manhood thing for him,” she said of his obsession with a border wall, according to an aide who passed along the remarks. “As if manhood could ever be associated with him. This wall thing.”

The White House had no comment on Pelosi’s “manhood” dig, though half a dozen sources close to Trump all pegged the chance at roughly below one percent that the president wouldn’t tweet something in retaliation. Instead, the more direct pushback was that Trump had strategically ambushed his Democratic counterparts by bringing the media in to the Oval Office; and that by agreeing to own the blame for a possible shutdown, he’d actually cornered them.

“I think that having Nancy Pelosi express her reservations about the conversation happening with the media present illustrated a discomfort on the topic,” said Marc Short, Trump’s former chief Capitol Hill liaison. “The president campaigned on this topic. It was arguably the central tenet of his campaign. So it’s a good position for the president to be in.”

—With additional reporting by Andrew Desiderio