The Senate passed a seven-month funding patch in time to avert a government shutdown — a major victory for President Donald Trump and Republicans controlling Congress that also caused a deep rift in the Democratic Party that could be exceedingly difficult to repair. The Senate voted 54-46 on the House-passed bill, almost entirely along party lines. Exceptions were Democratic Sen. Jeanne Shaheen of New Hampshire and Sen. Angus King of Maine — an independent who caucuses with Democrats — who voted “yes,” while Sen. Rand Paul, a Kentucky Republican, voted “no.” The bill now heads to the White House for Trump’s signature just hours before the deadline to keep federal operations afloat. The stopgap would fund government operations through the remainder of this fiscal year. It would slash non-defense funding by roughly $13 billion and increase defense spending by about $6 billion over current budgets — including billions for deportations, veterans’ health care and the military. Democrats opposed the measure due to the non-defense cuts, but also because Republicans refused to include language in the bill putting guardrails on Trump and Elon Musk’s ability to continue dismantling the federal bureaucracy unchecked. They had advocated for a shorter, four-week stopgap to keep the government running on current funding levels in an effort to buy more time for appropriators to strike a deal on a bipartisan funding package. But Republican leadership interest in those negotiations waned weeks ago. Democrats spent days agonizing over how to manage the politics of this moment. It came after an extraordinary turn of events, where Republicans in the House overwhelmingly passed their stopgap earlier this week without needing Democratic votes and then left town for a recess. It left Senate Democrats with no choice but to stand their ground against the GOP or force a shutdown, since eight Democratic votes in their chamber would be necessary to move the legislation over a procedural hurdle that required meeting a 60-vote threshold. The Democratic base clamored for Democrats to force Republicans back to the table and pass the shorter-term stopgap bill. Ultimately, Senate Minority Leader Chuck Schumer decided it wasn’t worth risking a shutdown scenario that could empower Trump and Musk to make more cuts to government agencies, and potentially fire federal workers. House Democratic leadership balked, with Schumer’s fellow New Yorker, Minority Leader Hakeem Jeffries, refusing to say at a press conference whether he still had confidence in his colleague’s leadership. Schumer’s decision also split his own leadership team, with some members voting “yes” to break the filibuster while others sided with the rest of their caucus in voting “no.” The vote on final passage, which only required a simple majority, was at that point largely symbolic for members of the minority party. Jennifer Scholtes contributed to this report.