The Memo: Trump pulls off a stone-cold stunner

President TrumpDonald John TrumpDems flip Wisconsin state Senate seat Sessions: 'We should be like Canada' in how we take in immigrants GOP rep: 'Sheet metal and garbage' everywhere in Haiti MORE for once united Washington on Wednesday — in shock.

Republicans and Democrats alike were left scratching their heads after the president did a deal with Senate Minority Leader Charles SchumerCharles (Chuck) Ellis SchumerDemocrats will need to explain if they shut government down over illegal immigration White House: Trump remarks didn't derail shutdown talks Schumer defends Durbin after GOP senator questions account of Trump meeting MORE (D-N.Y.) and House Minority Leader Nancy Pelosi (D-Calif.) over the express wishes of the most senior members of his own party.

Trump signed up to terms proposed by the Democrats on government funding, which would soon have run out, and the nation’s debt ceiling, which would soon have been hit.

Crucially, another funding measure and another hike in the debt ceiling will be required before the end of the year.

That’s a big problem for GOP leaders including Speaker Paul RyanPaul Davis RyanGOP leaders pitch children's health funding in plan to avert shutdown Lawmakers see shutdown’s odds rising Fix what we’ve got and make Medicare right this year MORE (Wis.) and Senate Majority Leader Mitch McConnellAddison (Mitch) Mitchell McConnellSessions: 'We should be like Canada' in how we take in immigrants NSA spying program overcomes key Senate hurdle Overnight Finance: Lawmakers see shutdown odds rising | Trump calls for looser rules for bank loans | Consumer bureau moves to revise payday lending rule | Trump warns China on trade deficit MORE (Ky.), who wanted a longer-term deal, kicking the next likely debt-ceiling increase beyond the midterm elections in November 2018.

Why did Trump do it?

People in his orbit say that the president was demonstrating to GOP leaders that they do not have the whip hand — and that, if they repeatedly fail to move his agenda, the commander in chief is willing to look elsewhere.

“I think it’s a warning shot,” said Barry Bennett, who was a senior adviser to Trump’s 2016 presidential campaign. “If the Republicans can’t come together as a majority to do something, the president knows where to get more votes.”

Separately, a GOP strategist with ties to the White House said that the president was "triangulating." Trump's overall aim, this source said, was "to show voters that [Congressional Republicans] are the real problem with Washington and that progress can be made if the will is there."

Beyond the ranks of Trump loyalists, however, the dominant reaction was one of perplexity.

“I find it very difficult to understand,” said Doug Heye, a former communications director for the Republican National Committee. “Clearly a long-term Republican majority and the long-term health of the Republican Party are not priorities for Donald Trump.”

Jim Manley, a Democratic strategist and former aide to ex-Senate Majority Leader Harry ReidHarry Mason ReidDems search for winning playbook Dems face hard choice for State of the Union response The Memo: Immigration battle tests activists’ muscle MORE (D-Nev.), pronounced himself “absolutely mystified.”

Manley added: “One of the things it shows me is that [Trump] just doesn’t care or understand how the Hill operates. There is nothing the Republican leadership hates more than rounding up votes for the debt limit. And he has now forced them to take votes twice on it.”

The move is a particular embarrassment for Ryan. On Wednesday morning, the Speaker had dismissed the parameters of the Democratic proposal as “ridiculous” and “disgraceful,” only to see the president endorse them a few hours later.

Ryan had no immediate public comment on the deal.

But other Republicans were not so reticent.

“The Pelosi-Schumer-Trump deal is bad,” read a tweet from the account of Sen. Ben SasseBenjamin (Ben) Eric SasseOvernight Cybersecurity: Bipartisan bill aims to deter election interference | Russian hackers target Senate | House Intel panel subpoenas Bannon | DHS giving 'active defense' cyber tools to private sector Interstate compacts aren't the right way to fix occupational licensing laws GOP senator demands briefing from Sessions after reports of Russian hackers targeting Senate MORE (R-Neb.).

Senate Finance Committee Chairman Orrin HatchOrrin Grant HatchKoch groups: Don't renew expired tax breaks in government funding bill Hatch tweets link to 'invisible' glasses after getting spotted removing pair that wasn't there DHS giving ‘active defense’ cyber tools to private sector, secretary says MORE (R-Utah) said he was “not supremely happy,” adding, “I just think it could be a much better deal than it is. And I think they need more time.”

A showdown late in the year is widely seen as giving the Democrats more leverage to extract concessions in return for votes to hike the debt ceiling.

Trump may see an allure in the idea of doing a major deal in December, when lawmakers are eager to leave for the holidays and the prospect of a government shutdown seems especially grim.

Hypothetically, such a deal could also encompass issues like a legislative fix for the Deferred Action for Childhood Arrivals (DACA) immigration program and perhaps funding for the southern border wall that Trump repeatedly promised during his election campaign.

“We’ve all known that Trump and Schumer are deal-makers. The president saw an opportunity to make a deal,” said Charlie Black, a veteran Republican strategist. Black added, “It would have been better to have consulted with the Speaker.”

Trump’s startling decision will spark a whole new round of speculation about his relationship with Republican leaders in Congress.

The relationship was already fraught.

Aides close to Trump first blamed Ryan, and later McConnell, for the ignominious failure to pass legislation repealing the Affordable Care Act, also known as ObamaCare.

The Republican Congress has remarkably little to show for its first eight months in full control of Washington. And Trump and McConnell reportedly stopped speaking for several weeks after the health care repeal effort foundered.

At the White House media briefing on Tuesday, press secretary Sarah Huckabee Sanders spoke in blunt and impatient terms about Congress, as she suggested it needed to pass some form of legislation to address the fate of around 800,000 DACA recipients.

“I don’t think the American people elected Congress to do things that were easy,” Sanders said. They have a job to do, she added, “and if they can’t do it, then they need to get out of the way and let somebody else who can take on a heavy lift and get things accomplished.”

Heye said that Trump’s shock deal the next day ought to be seen against that backdrop.

Sanders “made it very clear that a Republican-controlled Congress is not necessarily this administration’s priority,” he said. “So seeing them negotiating out from under House Republicans is distressing — but it can’t be totally surprising.”

The administration offered a very different explanation.

Marc Short, the White House director of legislative affairs, told reporters on board Air Force One Wednesday that the deal will help “to clear the decks” this month and that it “enables us to focus on tax reform” — the president’s other major legislative priority.

Trump praised Pelosi and Schumer during the same flight, calling the deal “very good” and his meeting with them “very, very cordial.” He did not mention Ryan or McConnell, who were also present.

Could the president be turning away from his own party and positioning himself as a pragmatist willing to deal with his opponents? Yes.

But it is tough to find anyone who believes there would be a large political dividend to be reaped by such a gambit, given the intensity of opposition to Trump among left-of-center voters and his apparent reliance on a fervently conservative base.

The most common explanation as the deal reverberated through Washington was also the simplest: that Trump was being Trump, as unpredictable and turbulent as ever.

Black, asked if the deal was an error on Trump’s part, replied, “I wouldn’t characterize it as a mistake.”

“People need to understand that this is not a two-party system anymore” he added. “You have a president in one place, and two parties in their respective places.”

The Memo is a reported column by Niall Stanage, primarily focused on Donald Trump’s presidency.