This story will continue to be updated as news develops.

WASHINGTON — President Donald Trump has signed a budget deal passed by both chambers of Congress, ending the surprise overnight government shutdown.

It was only early Friday when Congress voted and passed the $300 billion budget deal to the president.

Congress’s next hurdle is negotiating and completing long overdue omnibus spending bills before the next stopgap spending measure expires on March 23.

Lawmakers fumed as Paul repeatedly blocked a Thursday vote, sending the government stumbling into a shutdown and creating havoc for government workers. “I didn’t come up here to be part of somebody’s club. I didn’t come up here to be liked,” Paul said.

Passage of the two-year deal represents an 18-month respite from Washington’s budget dysfunction.

The deal, which was unveiled Wednesday by Senate leaders after months of partisan wrangling, includes a $148 billion boost for the Pentagon over two years, as well as funds for the rest of government and disaster aid. The deal lifts the debt ceiling and extends some tax breaks and health care provisions — and the six-week continuing resolution.

What happened at midnight?

As the clock hit midnight, the Office of Management and Budget issued an order to close nonessential government operations. Federal agencies were ordered to execute their contingency plans and instructed federal employees to report to work Friday to “undertake orderly shutdown activities.”

Once Senate rules allowed Senate leaders to bypass Paul, during the wee hours of the morning, the measure easily passed 71-28. In the House, the bill faced opposition from fiscal conservatives as well as Democrats who sought its linkage to protections for young immigrants.

The House passed the bill 240-186, splitting both Democrats and Republicans, who did not have the votes on their own. Democrats amped the drama by waiting until late in the voting period before 73 voted “yes”; 67 Republicans voted “no.”

The lower chamber hosted a raucous 5 a.m. exchange between Democrats, who made another pitch for Republicans to guarantee an immigration reform vote, and Republicans who argued the bill included many of Democrats’ other priorities.

“It is a basic constitutional responsibility of Congress to fund the federal government and Republican majorities in the House and the Senate are just turning the process into an embarrassing spectacle,” said the House Appropriations Committee’s top Democrat, Rep. Nita Lowey, of New York.

“Running from one crisis directly into the next: It has been clear for nine months that a bipartisan budget agreement would be needed to enact appropriations law. Yet it has taken five continuing resolutions, two lapses in funding, countless hours of effort to take even this first step toward full-year funding bills, more than four months into the fiscal year,” Lowey said.

House Speaker Paul Ryan, R-Wis., made a plea for the bipartisanship he needed and ultimately won, to pass the bill.

The Associated Press contributed to this report.

Joe Gould was the senior Pentagon reporter for Defense News, covering the intersection of national security policy, politics and the defense industry. He had previously served as Congress reporter.

More In Congress