 -- The House and Senate both passed a sweeping spending deal in the early hours of Friday morning – but not before the government technically ran out of money at midnight Thursday, triggering the second shutdown in less than a month.

The Senate, which began voting at 1:30 a.m. Friday, approved the deal 71 to 28. The vote was closer in the House, which voted at about 5:30 a.m. on Friday, but it passed, 240 to 186.

President Donald Trump signed the bill early Friday morning and the shutdown lasted less than nine hours. The brief overnight shutdown also makes Trump the first president since Bill Clinton to preside over two government shutdowns while in office.

An Office of Management and Budget official on Friday evening confirmed that there were some furloughs but wouldn't characterize the total estimated number.

"While we are still assessing the number of furloughed employees, the President signed a bill that ensures those affected individuals receive back pay," the official said.

The package includes a two-year budget package to increase spending caps by $300 billion over two years, and also includes funding to keep the government running through March 23.

The Senate vote was delayed until past midnight by Kentucky Republican Sen. Rand Paul — who spoke passionately for hours on the Senate floor Thursday evening as he tried to force a vote on an amendment that would effectively undermine the bipartisan deal.

Paul claimed the price tag is too big, and that instead of spending more on defense, the U.S. should withdraw from Afghanistan.

"Washington is broken," Paul argued, "spending money like it's out of control."

A visibly annoyed Majority Whip John Cornyn said Paul "will effectively shut down the federal government for no real reason."

"I know he wants to make a point. He has that right. I agree with many of his concerns about deficits and debt. But we are in an emergency situation," Cornyn said.

As the political theater played out on Capitol Hill, the White House had advised agencies to prepare for a shutdown and what the Office of Management and Budget was calling "a lapse in appropriations."

Throughout the day Thursday, Republicans and Democrats in Congress remained at odds over the sweeping bipartisan budget deal that would boost spending on military and domestic priorities and suspend the nation’s statutory debt limit until March 1, 2019, avoiding the risk of a potential default on the country’s debt payments.

But the agreement leaves unaddressed the controversial status of hundreds of thousands of young immigrants known as Dreamers, who face deportation as soon as March 5.

The Senate delay meant more time for liberal Democrats and Republican fiscal hawks in the House to whip up votes against the bill in their chamber. They oppose it on concerns over immigration and deficits, respectively.

The two-year spending deal would lift caps on defense and defense spending by $300 billion over two years. It also includes: $6 billion to fight the opioid crisis; $5.8 billion for child care development block grants; $4 billion for veterans medical facilities; $2 billion for medical research; $20 billion to augment existing infrastructure programs; and $4 billion for college affordability.

The measure would extend government funding at current spending levels until March 23 to allow lawmakers to finalize details on appropriations in an omnibus.

The majority of House Democrats, disappointed that the measure does not address the status of Dreamers, have protested the spending package and their potential loss of leverage in future immigration negotiations.

House Minority Leader Nancy Pelosi led 118 other Democrats in voting against the deal.

"I'm just telling people why I'm voting the way I'm voting," she said Thursday. "Many of our priorities are in the bill. But I have an unease with it and hope that the Speaker will man up and decide that we in the House can also have what Mitch McConnell guaranteed in the Senate: a vote on the floor [on immigration]," Pelosi said.

White House principal deputy press secretary Raj Shah said the president is also concerned about spending in Washington, but that the White House supports the bipartisan budget agreement.

"It lifts caps on defense spending, which is something the Secretary of Defense, the President's Generals, told they would need to ensure that we rebuild our military and protect our national security," said Shah.

Shah said the White House will be releasing a budget on Monday. "The budget does move us towards a path of restoring fiscal responsibility. It reduces our deficit by trillions of dollars," said Shah. Included in the White House's budget will be the new tax reform bill and "other priorities" from the administration.

ABC News' Meridith McGraw, Jordyn Phelps and Benjamin Siegel contributed to this report.