Suddenly, it seems like Sen. Charles Schumer Chuck SchumerVideo of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral Graham signals support for confirming a Supreme Court nominee this year Pelosi orders Capitol flags at half-staff to honor Ginsburg MORE (N.Y.) and Rep. Nancy Pelosi (Calif.) are driving the agenda in Congress.

The deal President Trump struck with the two Democrats over the objection of the majority leaders in his own party has at least temporarily upended the balance of power in Washington, emboldening Democrats who now see space to work with Trump on immigration and spending.

It’s a dramatic shift from Trump’s first seven months in office, when the president worked almost exclusively with Republicans and Democrats were largely an afterthought.

ADVERTISEMENT

But the past 24 hours have laid bare Trump’s deep frustration with Speaker Paul Ryan Paul Davis RyanKenosha will be a good bellwether in 2020 At indoor rally, Pence says election runs through Wisconsin Juan Williams: Breaking down the debates MORE (R-Wis.) and Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellMomentum growing among Republicans for Supreme Court vote before Election Day Trump expects to nominate woman to replace Ginsburg next week Video of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral MORE (R-Ky.).

The White House has grown tired of Republican leaders rebuking or handcuffing the president instead of enacting his agenda, particularly after months of work on an ObamaCare repeal bill ended in a disastrous defeat.

“Is he annoyed at Republican leadership? Yeah, I think he probably is,” said Mick Mulvaney Mick MulvaneyMick Mulvaney to start hedge fund Fauci says positive White House task force reports don't always match what he hears on the ground Bottom line MORE, Trump’s budget director. “And believe me, as a Republican, so am I. As a citizen, I am, too. I was promised that they would have repealed and replaced ObamaCare by now. … To the extent that the President was annoyed by that is simply reflecting many of the people of this country.”

Those frustrations seemed to come to a head in an Oval Office meeting on Wednesday where Trump overruled Ryan and McConnell in front of Pelosi and Schumer.

The president agreed to raise the debt ceiling on a short-term basis without any spending concessions to the Democrats, even after GOP leaders made the case for an extension that would last beyond next year’s elections.

Ryan, who will have dinner with Trump on Thursday night, had called the Democratic proposal “ridiculous” and “disgraceful” a few hours before the meeting.

Stunned Republicans vented their frustration with the turn of events.

ADVERTISEMENT

“Do your constituents know that Chuck Schumer Chuck SchumerVideo of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral Graham signals support for confirming a Supreme Court nominee this year Pelosi orders Capitol flags at half-staff to honor Ginsburg MORE, whose title is minority leader, not majority, just made himself the most powerful man in America for the month of December?” Sen. Ben Sasse Benjamin (Ben) Eric SasseChamber of Commerce endorses McSally for reelection Ben Sasse is mistaken with idea for the election of senators in America Big Ten football to return in October MORE (R-Neb.) wrote to Trump.

“This is an embarrassing moment for a Republican-controlled Congress and a Republican administration.”

Democrats, meanwhile, were gleeful over the divisions they’ve sown among Republicans and at their suddenly cozy relationship with the president.

Schumer and Pelosi have spoken multiple times with Trump since the Oval Office shocker and have crowed about their gains through media leaks and press conferences.

Pelosi spoke to Trump by phone on Thursday morning and asked him to assure the young immigrants impacted by his decision to phase-out the Deferred Action for Childhood Arrivals (DACA) program that they won’t be deported in the next six months.

Stunningly, he did just that.

Trump tweeted shortly after the call those so-called “Dreamers” have nothing to worry about.

Later in the day, Trump recounted a conversation he had with “Chuck and Nancy” in which he expressed optimism that Congress would come up with a legislative fix that might spare the “Dreamers” from deportation.

“I really believe Congress wants to take care of it,” Trump said. “We discussed that also today, and Chuck and Nancy would like to see something happen, and so do I.”

On his way to a speech on tax reform in North Dakota on Wednesday afternoon, Trump was in high spirits, apparently rejuvenated by the deal making with Democrats that had eluded him with Republicans. The president surprised reporters by coming back to the press cabin to answer questions and appeared upbeat.

Trump invited North Dakota Sen. Heidi Heitkamp Mary (Heidi) Kathryn HeitkampCentrists, progressives rally around Harris pick for VP 70 former senators propose bipartisan caucus for incumbents Susan Collins set to play pivotal role in impeachment drama MORE, a red-state Democrat up for reelection in 2018, to travel with him aboard Air Force One. The president later invited Heitkamp on stage to praise her as a “good woman” and to ask for her support on tax reform.

That marked another shift for Trump, who has used recent rallies and speeches to hammer incumbents in both parties, from Sens. Claire McCaskill Claire Conner McCaskillMomentum growing among Republicans for Supreme Court vote before Election Day Democratic-linked group runs ads in Kansas GOP Senate primary Trump mocked for low attendance at rally MORE (D-Mo.) to Jeff Flake Jeffrey (Jeff) Lane FlakeJeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Republican former Michigan governor says he's voting for Biden Maybe they just don't like cowboys: The president is successful, some just don't like his style MORE (R-Ariz.), in their home states.

"The President is committed to working across the aisle and doing what is needed to best serve the American people," White House press secretary Sarah Huckabee Sanders said.

Outside of some conservative media outlets like Breitbart, Trump has faced little criticism from the right for working with Democrats.

ADVERTISEMENT

There is confidence at the White House that with Congress’s low approval rating, the pressure is on Ryan and McConnell — not Trump — to deliver legislative victories. If they don’t, Trump’s base is signaling their ire won’t be directed at him.

Following Trump’s deal with Schumer, Senate Conservatives Fund president Ken Cuccinelli called for McConnell to be replaced, while conservative commentator Lou Dobbs said “RINOs” — Republicans In Name Only — like Ryan should be hunted to extinction.

“He's given Ryan and McConnell every opportunity to actually do something and they've clearly not been up to literally anything,” said Ned Ryun, a George W. Bush administration veteran who co-founded the conservative group American Majority.

“Heck, then throw in the fact that he has clearly stated they don't have his back on virtually anything regarding the Russia investigation, and I'm kinda surprised it took this long [for Trump to deal with Democrats].”

Tea Party Patriots co-founder Mark Meckler said “there may be a tiny bit of alarm” over Trump’s blossoming partnership with Democrats, but that most grass-roots conservatives are “still putting blame where it belongs — right in the laps of Congressional leadership.”

“People hate Congress and the leadership there right now,” Meckler said. “The hatred is white hot and not aimed at the president.”

Ryan and McConnell made it clear they disagreed with the president on the debt-ceiling deal but sought to put a positive spin on it.

ADVERTISEMENT

The Speaker said the GOP had avoided a “food fight" over government funding for Hurricane Harvey and McConnell noted that Trump’s “feeling was that we needed to come together, to not create a picture of divisiveness at a time of genuine national crisis.”

But more intra-party fights lie ahead.

In an interview with The New York Times on Thursday, Ryan said he doubts the GOP can achieve Trump’s stated goal of lowering the corporate tax rate to 15 percent.

Meanwhile, Trump mused to reporters about getting rid of the debt ceiling entirely — something that would be supported by Democrats but is anathema to Republicans.

"The people of the U.S. want to see a coming together," Trump said.

“I think we will have a different relationship than we've been watching over the last number of years,” he added. “I hope so. I think that's a great thing for our country. And I think that's what the people of the United States want to see. They want to see some dialogue.”