As thousands of protesters filled the streets of cities across America chanting "not my president" Wednesday night, stunned Democratic leaders in Washington are struggling with the grim reality of having to work with President-elect Donald Trump — a man they spent months calling an authoritarian racist.

While many Democrats before Tuesday had put little real thought into the concept of a Trump White House, there was also little doubt after he won that they should accept the reality and try to make the best of it.

That might put party leaders in immediate conflict with their base in the streets, who made the hashtag #nounity and #NotMyPresident go viral and see any cooperation as a tantamount to surrender.

"Any Democratic member of Congress who didn't wake up this morning ready to fight, resist and obstruct in the way Republicans did against President Obama every day for eight full years must step out of the way and let those of us who know the score lead the way in stopping the meanness and the madness that's about to begin," filmmaker Michael Moore wrote in a widely shared call to arms.

Related: In Capitol Hill Meetings, Trump Reveals Top Priorities

Democrats in Washington are uneasy working with Trump, but worry he’d be more dangerous if left to his own devices. And as the the party of government, Democrats feel compelled to make it work for their constituents as much as possible. Dysfunctional government will generally benefit the anti-government party, which is the GOP.

"My number one priority in the next two months is to try to facilitate a transition that ensures our President-elect is successful," President Barack Obama said Thursday after meeting with Trump.

As much as Democrats fear Trump’s idiosyncratic agenda, they also fear he might end up a rubber stamp — wittingly or not — for the traditional conservative economic principles embodied by House Speaker Paul Ryan.

Trump wandered into an ideological war already in progress and Democrats hope his allegiances are fluid after a campaign where he fought Ryan and the entire Republican establishment.

"Donald Trump won the Presidency under a Republican flag. But Mitch McConnell, Paul Ryan and the Republicans in Congress — and their way of doing business — were rejected. Rejected by their own primary voters, rejected during the campaign, and rejected in Tuesday’s election," Sen. Elizabeth Warren said at the AFL-CIO on Thursday.

"If Donald Trump is ready to make good on his promise to get corruption out of politics," she continued, "Then count me in. I will work as hard as I can. I will pull as many people as I can into the fight."

But she drew a bright line around defending the rights of minority groups. "That is Democrats’ first job in this new era: We will stand up to bigotry. No compromises ever on this one," she said.

Related: Trump Team Reviewing High-Level Cabinet Appointments

Congress’s moribund legislative engine will whirl to life under united Republican government, so Democrats on Capitol Hill are scrambling to both "defend the vital organs," as one Democratic Senate aide put it, while hoping to drive a wedge between Ryan’s conservative agenda and Trump’s populist one.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Some of the most sympathetic responses to Trump’s victory from the left side of aisle have come not from Democrats' moderate wing but from its progressive flank, which has long sought to push the Democratic Party in a more populist direction.

"More than anything, this election is an indictment of politics as usual,” said Richard Trumka, the president of the AFL-CIO, the Democrat-aligned labor federation.

"Donald Trump tapped into the anger of a declining middle class that is sick and tired of establishment economics, establishment politics and the establishment media," Sen. Bernie Sanders said in a statement.

"To the degree that Mr. Trump is serious about pursuing policies that improve the lives of working families in this country, I and other progressives are prepared to work with him," Sanders added.

The clarity of vision from the populist-left has made the muted response from the Democratic establishment more noticeable.

Related: Obama Gives Trump White House Welcome

The first real-world test of any cooperation be an infrastructure-spending bill, which was going to be a top priority of a President Hillary Clinton as well.

House Minority Leader Nancy Pelosi told colleagues that she spoke with Trump to offer "the support of House Democrats to find common ground for a robust infrastructure jobs bill," according to an aide. Pelosi also suggested a path forward on child care and family leave issues, for which Trump expressed support during his campaign.

But beyond that, the outlook is bleak for Democrats.

As they survey the successes of the Obama years, they expect massive setbacks on immigration, climate, financial reform and especially the Affordable Care Act, which McConnell has said would be his first target.

And despite Ryan and McConnell's poor relationship with Trump during the campaign, it will be extremely difficult for Democrats to exploit those tensions when Republicans on both sides of Pennsylvania Avenue have so much to gain.

"Trump’s election was blunt force. For some members to think that this is something we can nuance, I think that’s not something that can be done that easily," said Rep. Raul Grijalva, the co-chairman of the House Progressive Caucus who was the first member to endorse Sanders during the primary.

Related: How Trump Could Erase Key Parts of Obama's Legacy

With both chambers of Congress and the White House now controlled by Republicans, and the Supreme Court about to have its conservative majority reinstated, Democrats’ last check on GOP power is the Senate’s filibuster.

As Republicans demonstrated over the past six years, it gives the minority wide latitude to obstruct the majority. But no one in the Senate expects what’s left of the filibuster to survive, according to several aides.

"We've been given a temporary lease on power," said McConnell. "I think what the American people are looking for are results."

Everyone's a hypocrite on the filibuster as their party moves in and out of the majority, but Democrats are about to reap what they’ve sown.

Over the objection of some long-serving members, then-Democratic Senate Majority Leader Harry Reid in 2013 eliminated the filibuster for executive branch and lower court appointments.

McConnell can now use that precedent to follow through and whip it away for Supreme Court appointments and legislation, which could give Republicans the ability to pass their agenda with a simple majority of 51 votes.

Related: Anti-Trump Protesters Fear Rollback of LGBTQ Rights

Meanwhile, Democrats declared it completely unacceptable to to take the debt limit hostage or to shut down the government for political reasons, complicating any attempt to use those tools.

Looking ahead, Democrats best hope is to make enough gains in the 2018 midterms to take control of one chamber and become the kind of obstructionist block the Republican-controlled House has been for Obama.

But the Senate map favors Republicans that year, when they will have to defend on eight seats compared to Democrats' 25. And gerrymandering has made the House extremely difficult for Democrats to win.

The good news for Democrats is the majority of the country appears to be with them as Trump’s win was purely the result of the peculiarity of the Electoral College. Hillary Clinton appears to have won the popular vote while Democrats made small gains in the House and Senate.

The risk of overreach is very real for Republicans, as McConnell acknowledges. And presidents of both parties historically face backlash in the first midterm after their election.

"I think it's always a mistake to misread your mandate," McConnell said. "I think overreaching after an election is, generally speaking, a mistake."