Lawmakers in Congress worked though the early hours Friday to end a brief government shutdown—the second of the year—hammering out and eventually passing a big two-year spending bill.

The bill cleared the final hurdle in a 240-186 vote in the House, preventing the continuation of a government-wide shutdown that started at midnight after Republican Sen. Rand Paul held up a vote on the bill in the Senate.

Paul argued the bill’s $400 billion increase to defense and non-defense spending over the next two years shows that “Washington is broken” and is “spending money like it’s out of control.”

The bill lifts the debt ceiling until March 2019 and increases discretionary spending—which does not include entitlements like Medicaid—by 21 percent over the current limit. It also offers $89 billion in extra disaster relief for hurricanes and wildfires that hit several states last year.

Deficit hawks like Paul, who do not want to see an increase to the $20 trillion in debt the U.S. government has taken on, lost out as the Senate voted 71-28 to fund the government through March 23 and pass the two-year spending bill in early hours voting Friday.

Before the Senate voted, however, Mick Mulvaney, Director of the Office of Management and Budget, told federal agencies that non-essential government operations should close.

It was the second time the government shut down in three weeks after Republicans and Democrats failed January 20 to agree on immigration reform that was hitched to a short-term spending bill. The January shutdown lasted through a weekend, ending with agreement on the evening of Monday, January 22. 

Read more: We’ll be paying for the new budget deal for a decade

The Senate bill jettisons discussion of immigration reform. The vote in the House came early Friday, but was trickier to pass as both liberal Democrats and hard-right members of the Republican Tea Party opposed it.

House Minority Leader Nancy Pelosi said she would not vote for the spending bill because it doesn’t include protections for Dreamers, undocumented immigrants who were brought to the U.S. as children. Pelosi gave a record-setting eight hour speech to Congress on Wednesday defending the group.

Members of the hard-right House Freedom Caucus said they could not vote for the bill because of its debt and spending increases. Republican Rep. Andy Biggs called the bill “a fiscal disaster parading as a military support bill” in an opinion piece published by Fox News early Friday.

“I fully support funding our military & giving them the resources needed/deserved. But, I cannot vote for this financially irresponsible deal. Washington has a spending problem,” South Carolina Republican, and Freedom Caucus member, Rep. Ralph Norman tweeted Thursday.

Nevertheless, the bill passed, bucking a Republican tradition of arguing for low spending and lower deficits.