The members who voted "yes" effectively had Pelosi's blessing, as she did not make a significant effort to whip against the bill. Many members say she wanted the bill to pass, despite her push for an immigration commitment, and that her public comments showing support for the spending part of the deal reflected that.
The exact reasoning so many Democrats supported the bill is hard to break down into coalitions, as there are a variety of reasons why Democrats would be included to support the budget deal.
It boosts nondefense spending by $63 billion above the sequestration caps in fiscal 2018 and by $68 billion in fiscal 2018. Some of that money is earmarked for priorities important to the party like opioid abuse prevention, veterans and infrastructure.
The Democratic supporters came from a variety of groups, like the centrist New Democrat Coalition, the Congressional Black Caucus, members of the Appropriations Committee and representatives from states standing to benefit from $90 billion in disaster aid.
Of the 67 Republicans who voted against the measure, the vast majority were fiscal conservatives who felt the amount of deficit spending in the bill -- $320 billion, according to the Congressional Budget Office -- was far too much to swallow.
Ryan tried to play it off, saying mandatory spending on entitlements is the real driver of the debt, not discretionary. And President Donald Trump blamed the increased spending on the lack of a GOP supermajority.
"Without more Republicans in Congress, we were forced to increase spending on things we do not like or want in order to finally, after many years of depletion, take care of our military," the president tweeted Friday morning.
Trump said in another tweet that the bill included "much waste in order to get Dem votes."
Of note were the small number of Republicans willing to vote for fiscal discipline, particularly in the wake of the passage along party lines of a tax overhaul measure that is estimated to add $1.5 trillion to the deficit.
"If Nancy Pelosi was right about anything, it was that the fiscal hawk is becoming more and more of an endangered species in the Republican Party," Florida GOP Rep. Matt Gaetz said Wednesday after House GOP leaders briefed rank-and-file members on the budget deal. Gaetz voted "no" on Friday morning.