The House has narrowly passed a sweeping bipartisan budget accord, ending an hours-long government shutdown and clearing a path for huge spending increases for both the Pentagon and domestic programs.

The 240-186 vote sends the $400 billion spending plan to President Donald Trump, who has promised to sign it.

Passage of the measure came over the opposition of Democratic leaders who demanded the promise of a vote to protect “Dreamer” immigrants brought to the country illegally as children.

A band of tea party Republicans swung against the legislation as well, repelled by its spiraling spending levels.

The government shut down at midnight Thursday after Kentucky GOP Sen. Rand Paul blocked plans for a quick Senate vote, blaming his fellow Republicans for being “complicit” in the looming return of trillion-dollar budget deficits.

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)