When President Trump convened congressional leaders this week to negotiate disaster aid and avert a month-end fiscal crisis, the Oval Office conversation quickly turned to what Minority Leader Nancy Pelosi called "the currency of the realm": votes.
Republican leaders wanted to avoid a short-term accord, and Treasury Secretary Steven T. Mnuchin argued that financial markets would prefer a deal to push the next deadline out 18 months, past the midterm election. At every step in the negotiation, Pelosi raised a simple question: Do Republicans have the votes?
Pelosi, perhaps the most skilled vote-counter in Congress, knew they did not. Back and forth it went until Trump cut off debate, stunning all sides by agreeing with Democrats on a stopgap measure to fund the government and lift the nation's borrowing limit only until Dec. 8, and provide Hurricane Harvey aid.
"The president has been in a business where knowing your numbers has been essential," Pelosi said Friday in an interview with reporters. "He saw they didn't have the votes. And we had the plan."
Congress gave final approval Friday to the surprise package, which Trump swiftly signed into law, giving Democrats momentum over Republicans in the battles ahead over tax cuts and deportation protections for young immigrants known as "Dreamers."
The outcome was unexpected even a few days ago, but it shows the power that Pelosi (D-San Francisco) and Senate Minority Leader Charles E. Schumer (D-N.Y.) are still able to wield in a Congress controlled by a Republican majority unable to present a unified front and with a political newcomer in the White House willing to make deals.
More Democrats than Republicans backed the package, which provided $15.2 billion in disaster assistance and temporarily ended the standoff over government funding and the debt limit.
For Trump, still frustrated by the collapse of the Republican plan to repeal and replace Obamacare, it was a lesson that his agenda may have more success if he reaches across the aisle to broker compromises with Democrats.
Democrats — who had been largely ignored or attacked by Trump as "obstructionists" — are seizing on the opening, pushing for a seat at the table for Trump's tax overhaul. They also seem to have won his support for legislation to provide protected status for the young immigrants brought to the U.S. illegally as children, despite his decision announced this week to terminate the Obama-era Deferred Action for Childhood Arrivals program, known as DACA.
"Now we have a lot more to get done, and we hope we can work in the same bipartisan way on the issues that remain before us," Schumer said this week.
Republicans grumbled, sometimes angrily, at the quick turn of events. On Friday, ahead of the House vote on the aid and fiscal deal package, Mnuchin and White House Budget Director Mick Mulvaney were met with audible unrest during a private meeting with House Republicans upset at being asked to take on more debt and spending without offsets.
"Everyone was moaning and groaning and grunting, 'You've got to be kidding me,'" complained Rep. Dave Brat (R-Va.), a member of the conservative Freedom Caucus, after voting against the deal. "Not good."
House Speaker Paul D. Ryan (R-Wis.) has tried to maintain his hold on the majority, but lawmakers are increasingly worried about facing voters back home with little to show for the first eight-plus months in office. After early stumbles, confidence is slipping that Ryan and House Majority Leader Kevin McCarthy (R-Bakersfield) have a strategy for success on tax reform and the spending issues ahead this fall.
"Here we are, backed into a corner — it doesn't take a genius" to see the outcome, said Rep. Scott Perry (R-Pa.), another Freedom Caucus member.
Conservatives don't blame Trump for the disarray as much as they do their own House and Senate leadership, who they do not believe sufficiently sketched out a legislative game plan to accomplish the goals of a healthcare overhaul and tax reform they promised voters.
"What's the leadership's plan?" asked Rep. Mark Meadows (R-N.C.), the Freedom Caucus leader who is close with Trump and former White House senior advisor Stephen K. Bannon, during a breakfast Thursday with reporters. "Was there a plan?"
Sen. Mike Lee (R-Utah) called the strategy of tying disaster aid to the vote to lift the debt limit a "disgraceful process." He voted against it.
In all, 90 House Republicans opposed the package, as did 17 Senate Republicans.
The outcome in the months ahead is not likely to be much different.
In December, Congress will again need to provide funding to keep the government running and lift the debt limit to allow more borrowing, or risk a shutdown and fiscal crisis.
Trump, who headed to Camp David this weekend, said Friday on Twitter that unless the Senate does away with the filibuster, which Majority Leader McConnell (R-Ky.) is unlikely to do, Republicans will always be stymied by the 60-vote threshold that currently requires at least eight senators from the Democratic caucus to join the 52-seat GOP majority to advance bills.
But in reality, the filibuster is not wholly to blame. On the healthcare overhaul, Republicans used special budget rules that allow for majority passage, and they still lost. Tax reform could face the same outcome.
On the year-end battles, many Republicans will almost certainly vote against measures for more borrowing and spending unless they are coupled with reductions or other budget reforms to reduce deficits.
By withholding their votes, conservative Republicans are diluting the majority's strength and denying Ryan and McConnell the leverage they need to bargain for those reforms. Such standoffs led one centrist Republican, Rep. Charlie Dent of Pennsylvania, an influential leader of the GOP's moderate wing, to announce this week he would not seek reelection — the third to do so.
Pelosi and Schumer, by providing the votes — the currency, as she called it — will continue to hold the more powerful deal-making position, not only to stop Republican efforts to defund Planned Parenthood or other partisan measures, but to push Democratic priorities.
Democrats already won a commitment from Trump during their White House meeting that he would sign into law the Dream Act, which would put the young immigrants on a path to legal status.
If the Dream Act is not considered before December, Democrats will probably work to add it and other measures — perhaps including one to shore up the Affordable Care Act — to the year-end package.
At the White House on Friday, Press Secretary Sarah Huckabee Sanders said the president would deal with all comers.
"He's going to continue to work with whoever is interested in moving the ball forward," she said. "He wants Congress to act."
2:40 p.m.: This article was updated after Trump signed the bill.