President Trump's startling alliance with Democrats stemmed from his building frustration with Republican leaders' inability to secure the legislative victories he assumed would come more swiftly — but its genesis is far more certain than its potential for success.
The new relationship saw its first result on Thursday. The Senate advanced legislation based on Trump's deal Wednesday with the Democratic leaders, Rep. Nancy Pelosi and Sen. Charles E. Schumer, to extend until Dec. 8 the government's debt limit and funding, and to offer the first billions in relief money for victims of Hurricanes Harvey and Irma.
Trump also indicated his interest in working with Schumer on a longer-term deal: to void the requirement that Congress vote to extend the government's debt ceiling, a budget exercise that authorizes the Treasury to borrow to cover spending already approved. But lawmakers' reluctance to cast that unpopular vote has regularly threatened to send the country into default.
The president also met with Democrats from New York and New Jersey to discuss improving transit infrastructure in those states.
Working with Schumer, a New York Democrat he derided as "Crying Chuck" as recently as June, was a sign from the president unseen in the last seven months. From his start, Trump worked solely with Republicans on measures meant to satisfy a narrow, conservative base. But the president suddenly seemed intent on pursuing whatever path allowed him to be seen as the successful deal-maker he'd vowed to be — a promise he has not been able to achieve as his priorities have stalled on Republican-controlled Capitol Hill.
Trump told reporters at the White House that he could foresee working in bipartisan fashion on a host of issues.
"I think we will have a different relationship than we've been watching over the last number of years. I hope so," he said. "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. They want to see coming together."
Still, the new move reflected less a dawning relationship with the opposite party by a suddenly unfettered and independent president than a warning to Republicans to corral their warring factions, according to current and past Trump advisors.
They said Trump was expressing his anger at fellow Republicans, whom he blames for his inability to make good on pledges he made during the election, such as repealing and replacing the Affordable Care Act. The absence of big achievements has contributed to the president's lagging popularity, which in turn has lessened his control over his quarrelsome party.
Barry Bennett, a former Trump strategist, said his dalliance with Schumer and Pelosi did not necessarily suggest a long-term relationship, but was meant as "a shot across the bow" for Republicans in Congress.
"We're seeing the pragmatic, transactional President Trump," Bennett said. "You know, Republicans can control everything if they choose to, but if they can't get along and can't get it done, they shouldn't be surprised another solution comes up."
Nonetheless, Trump's moves came at much risk: alienating his own party's congressional leaders, renewing concerns among conservatives over his loyalty to their goals and — by increasing Democrats' leverage going into fall negotiations on a range of topics — diminishing GOP power on Capitol Hill.
Some Republicans sought to put the best face on Trump's move, arguing that it reflected a desire to move ahead on topics important to both them and the White House, chiefly tax reform. Others remained defiantly angry that the president had undercut party leaders including House Speaker Paul D. Ryan (R-Wis.).
Still others blamed Ryan and leadership colleagues for Trump's move toward Democrats. Rep. Mark Walker of North Carolina, chairman of the conservative Republican Study Group, which represents almost two-thirds of the party's members in the House, sent a tartly worded letter to Ryan that called the Trump deal irresponsible.
"Worse yet is attaching the debt limit to legislation that continues the status quo or even worsens the trajectory of spending," Walker wrote.
Trump has proven highly unpredictable, and it was not clear whether his alliance with Democrats would survive the week, much less the months required to establish a true change of direction for both sides and yield results.
Still, the shift was in keeping with Trump's campaign persona: that of a Republican with staunchly conservative views on some matters like funding the military and securing the border, but lacking the ideology on economic and cultural issues that has driven Republicans on Capitol Hill.
"He is a pragmatist.… He wants to get things done," said one confidant, who spoke on the condition of anonymity to preserve relations with the White House. "If that means reaching across the aisle to get things done, I think he's very willing to do that."
The alliance has obvious limitations; the Democratic deal sanctioned by Trump represents one of only a few matters about which the two sides may find themselves in agreement.
And, of course, Democrats want to replace Trump in 2020. Sam Nunberg, a former Trump strategist, said that the Democratic leaders had "played the president."
"Pelosi and Schumer will work hand-in-hand with the president on one action item: impeaching him," he said. "That is it."
For her part, Pelosi, of San Francisco, was unsure of the extent to which the president was prepared to work with her party.
"The world we live in is a giant kaleidoscope," she said. "You never know.… Let's hope this is a sign of something to come."
If so, signs were uneven: Trump's reelection campaign on Thursday released an ad that cast Schumer and Pelosi as "career politicians" who were "trying to stop him."
While Trump's irritation at congressional Republicans has been visible for months, prominently so in his frequent posts on Twitter, the president has ignored his own responsibility for the failures to date as the ostensible leader of a party that has often appeared rudderless.
Much like on health insurance in past months, his head-snapping back-and-forth on Tuesday over the program for young immigrants, known as Deferred Action for Childhood Arrivals, or DACA, provided a confusing template for congressional Republicans seeking to know his desires.
He first tweeted a demand that Congress come up with a fix for DACA beneficiaries, known as "Dreamers," omitting any details. Then the White House demanded passage of a comprehensive immigration overhaul, a nearly impossible task given the six-month deadline Trump set.
Again, no details were forthcoming; White House Press Secretary Sarah Huckabee Sanders would only say that Congress needs to provide more than "just a one-piece fix" to replace the Obama-era program.
At the same time, she mocked members of Congress as regular vacationers who, if they could not deliver on the administration's vague demands, should "get out of the way and let somebody else take their job."
Later that day, Trump seemed to take the pressure to act quickly off Congress, tweeting that if the matter was not fixed in six months he would "revisit" it and potentially reinstate the DACA program despite his campaign pledge to get rid of it.
On Wednesday, on a flight to North Dakota for a rally, Trump said he wanted "good border security" and a DACA program "where everybody is happy and now they don't have to worry about it anymore" — ignoring substantial anti-DACA sentiment in his party.
To have that uncertainty followed by a quick deal with Democrats — announced in the Oval Office in front of Ryan, Senate Majority Leader Mitch McConnell (R-Ky.) and Treasury Secretary Steven T. Mnuchin, all of whom opposed it — further unnerved Republicans.
Trump's aides were left in the familiar position of crafting an after-the-fact explanation for the president's acts, trying to calm fellow Republicans who will in large part determine his chances of success.
"I would say the best part about this is this clears out the next 90 days for us to focus on important things," Mnuchin told Fox Business Network's Maria Bartiromo. "So we have the funding for Harvey; we're focused on tax reform. That's going to be the big priority for the next 90 days … so that we can have a bill passed for the president to sign."
Mick Mulvaney, Trump's budget director, offered a rationale that glided past the rancor and shock felt by many of his former Republican House colleagues toward their president, blaming Congress' unpopular party leaders.
"Is he annoyed at Republican leadership? Yeah, I think he probably is," he told Fox Business Network's Neil Cavuto. "To the extent that the president was annoyed by that is simply reflecting many of the people of this country."
Times staff writer Brian Bennett contributed to this report from Washington.