President Trump, by his second deal in as many weeks with Democratic leaders, has upended the political calculations of both of their parties: Many Republicans are left fuming of his betrayal, while some Democrats have begun warning party leaders against getting too cozy with a president they vow to resist.
Trump is betting that he can play the two sides against each other and finally notch some legislative achievements, in turn reassuring centrists and improving his dismal poll ratings. The risk, as the president's nationalist allies already are warning, is that Trump alienates some among his loyalists even as other voters remain resolutely hostile, and he sinks further.
With the latest deal, Trump could not have chosen an issue more likely to test his core supporters. After winning election on an anti-immigration platform, he has agreed with Democrats to seek a law protecting from deportation roughly 800,000 young immigrants brought to the country illegally as children — a group of whom he formerly said flatly, "They have to go."
After nearly eight months of playing only to his base, Trump's moves suggest a stunning course correction. He, characteristically, expresses confidence of how it will turn out.
"If the Republicans don't stick together then I'm going to have to do more and more" with Democrats, he told reporters aboard Air Force One on Thursday. "The people out there definitely agree with me."
It is an unprecedented challenge from a president to his party's legislative leaders, who nominally control Congress. But Trump's gamble — that Democratic leaders can help him win deals on immigration, taxes, infrastructure and more — also will challenge their ability to corral their own restive rank-and-file members and party activists who have deep qualms about working with Trump, and giving him victories.
"They're negotiating with someone that we don't trust," said Angel Padilla, policy director for Indivisible, an anti-Trump group that claims 6,000 chapters, speaking of the Democratic congressional leaders, Senate Minority Leader Charles E. Schumer and House Minority Leader Nancy Pelosi of San Francisco.
Padilla said details, still to be resolved, are crucial for advocates on the left, who would oppose any plan they view as fueling Trump's "deportation machine." Their distrust was fueled by Trump, who said after his White House dinner on Wednesday with Schumer and Pelosi — Chinese food, a Schumer favorite — that a final deal would have to include measures for "extreme border security" and "an understanding" about separate new funding for the Southern border wall.
Angel called Trump a "white supremacist," underscoring the vitriol directed at the president from the left, adding, "We don't want people normalizing this. It's not acceptable. It's not normal behavior."
Similarly, Nick Berning, chief communications officer of MoveOn.org, accused Trump of trying to advance a "white nationalist" program and warned, "Democratic leaders would be letting the country down if they failed to continue resisting his toxic agenda."
That enmity is mirrored within Trump's base, especially on immigration.
"I have no doubt Trump is a good negotiator in real estate, but mobbed-up bosses and crooked building inspectors are much more reliable negotiating partners than Chuck Schumer," said Mark Krikorian, executive director of the Washington-based Center for Immigration Studies, which advocates for immigration restrictions.
"I don't think the president knows what he's getting into with this guy."
Krikorian, like the usually pro-Trump, right-wing news site Breitbart, dubbed the president "Amnesty Don."
Other Trump allies say the president is seeing the potential rewards of bipartisanship, but simply needs to keep advisors and congressional Republicans more in the loop.
"Obviously, he's not a guy who dots the I's and crosses the T's," said Christopher Ruddy, the chief executive of Newsmax and a longtime Trump friend. "It's always going to be his style to sort of let things all hang out there."
"He'll figure that out," Ruddy added. "He does things by trial and error and he finds what works."
Democrats who support engaging with Trump, at least on a limited basis, point to the latest agreement as evidence that they are better off having a seat at Trump's table than not. They are banking on the ability of their more seasoned leaders to outfox Trump, who has no previous government experience and has been unable to score big legislative wins with Republicans.
"He's the president of the United States. We offered him something that was for the good, a path to a better budget, to pass DACA, to have our agenda have more leverage in the debates that are coming up. And he accepted it," Pelosi said in an interview after last week's fiscal deal with Trump but before Wednesday's dinner.
"So I think anytime a president wants to accept our proposal, we're going to do that," she added.
Pelosi said Democrats would work with Trump when they see common ground — she cited the potential for an infrastructure deal — but would oppose him vigorously on other issues. For example, she dismissed Trump's goal on taxes as simply seeking "tax cuts for the high end and for certain special interests in our country."
On Thursday, Schumer was overheard on the Senate floor boasting that he told Trump, "You're much better off if you can sometimes step right and sometimes left. If you have to step just in one direction you're boxed."
"It's going to work out and it'll make us more productive, too," Schumer said.
The left's pressure on Democratic leaders to resist Trump is likely to grow, however, if the still-to-be-determined legislative deals fall short.
Last week's stopgap agreement — to keep the government funded and to raise the nation's debt ceiling until early December -- was comparatively easy: Pelosi and Schumer won the legislative leverage they wanted without giving up anything.
Republican leaders had wanted to extend the debt limit beyond the 2018 midterm elections, both to spare conservatives from facing that unpopular debt vote again soon and because they generally need Democrats' votes for the must-pass legislation, which is what gives Democrats broader leverage.
Issues that require compromise would be much harder for the Democrats — even a jobs-creating program to build roads, bridges and other infrastructure, which Pelosi noted is normally a bipartisan issue.
Trump favors an infrastructure program that relies mostly on tax incentives for private-sector investments. Democrats say that would lead to giveaways and leave unbuilt many needed public projects that hold no appeal to corporations. They want direct federal spending, but that would upset many Republicans.
"The only acceptable way to deal with Trump is if he gives Democrats an outright victory," said Adam Green, co-founder of the Progressive Change Campaign Committee, citing last week's fiscal deal as an example. "Anything below that normalizes him and potentially hands him reelection."
Immigration advocates worry especially about allowing the Dreamers to become part of broader negotiations over tougher immigration enforcement, as Trump has proposed.
"They can't feel like they're being used as a bargaining chip for anything," said Jose Dante Parra, a former Senate Democratic leadership aide who now heads a consulting firm called Prospero Latino. "If the deals really do benefit most people, if they can make that argument, I think they'll be OK."
A Senate Democratic leadership aide cautioned against reading too much into the party leaders' broader willingness to compromise, insisting that the "price for any Democratic cooperation is going to be extremely high."
Pelosi and Schumer, after all, also must excite anti-Trump activists ahead of the 2018 elections and will balance that get-out-the-vote imperative against the merits of any legislation that could grant Trump a big victory.
Staff writers Mark Z. Barabak and Brian Bennett contributed to this report.