WASHINGTON (CBSNewYork) —  President Donald Trump says he has signed the budget deal, ending an hours-long government shutdown.

The president tweeted Friday: “Just signed Bill. Our Military will now be stronger than ever before. We love and need our Military and gave them everything — and more. First time this has happened in a long time. Also means JOBS, JOBS, JOBS!”

READ MORE: Storm Watch: Officials Hoping To Avoid Repeat Of Ida With Preparations For Nor'easter

The House approved the $400 billion budget deal in a 240-186 vote after the package was approved by the Senate early Friday morning.

The House began debating the bill around 3 a.m. Friday. Some were pushing for the bill to pass to end the shutdown, but they were facing opposition from conservative Republicans who thought the bill was just too expensive.

“Perhaps as early as this morning, the president of the United States might sign that meaning the American people can wake up today with confidence,” said Texas Republican Sen. Pete Sessions.

“It accomplishes what so many of us had been fighting for,” said House Speaker Paul Ryan.

But some House Democrats, led by Minority Leader Nancy Pelosi, insisted they would vote against it unless they get assurance from Ryan to commit to a vote on immigration legislation.

“I wish that the speaker would treat the House of the speaker with the dignity it deserves with giving us the opportunity,” she said.

The bill was passed in the Senate in a 71-28 vote just before 2 a.m. Friday after lawmakers missed the midnight deadline, triggering the shutdown.

READ MORE: NYPD: Man Shot Inside Union Square Subway Station

Kentucky Republican Sen. Rand Paul intentionally stalled the vote, running out the clock in a move to protest what he says is runaway spending.

“The result of this bill today is a bipartisan looting of the treasury.

The $400 billion agreement funds the government for six weeks and raises federal budget caps for two years on defense and domestic spending.

The bill also lifts the nation’s debt ceiling for a year and allocates $90 billion for areas hit by hurricanes and wildfires.

“The hypocrisy is astounding,” Paul said. “Every one of these Republicans complained about President Obama’s deficits and yet now we have them out there bragging, and pushing, and doing everything they can to get their trillion-dollar deficit through. I object.”

Many of his GOP colleagues objected to the protest.

“I agree with many of his concerns about deficits and debt, but we are in an emergency situation,” said Texas Republican Sen. John Cornyn.

MORE NEWS: Exclusive: CBS2 Cameras On Hand At Unannounced Security Screenings At Troubled New York City High Schools

Essential personnel remained on the job overnight, regardless of the shutdown.