More than 100 House Republicans broke from their leadership on Wednesday and voted against a $1.2 trillion spending bill to keep the government open through September, which passed thanks to Democrats' near-unanimous support.

The bill passed 309-118, in a vote that saw 103 Republican oppose the measure. Most Republicans did vote for the measure, but the caucus was split significantly, 132-103. Democrats in much more in favor of the bill, as 178 voted for it, and just 15 voted against it.

That opposition from Republicans reflects anger over how the bill was negotiated, which resulted in a final product that didn't include money for President Trump's border wall, and included funding for other Democratic priorities. Many Republicans groused that the bill was written as if Republicans weren't in charge of the House, Senate and White House.

Nonetheless, it now heads to the Senate, where it is expected to be cleared for President Trump's signature before the May 5 deadline.

While many in his party opposed it, House Speaker Paul Ryan, R-Wis., said the "many" of the Republicans' priorities would be advanced by the bill. "Each side doesn't get everything it wants, but we are able to come together on a package that supports many of our important goals," he said.

The legislation is comprised of nearly a dozen separate spending bills that Congress was unable to pass last year. It includes an extra $15 billion for defense spending, and an additional $1.5 billion for border security, the largest boost in a decade.

"Today we take a critical step in fixing the potholes in our military readiness" said Rep. Kay Granger, R-Texas, the Defense Appropriations subcommittee chair.

The bill also provides funding for two recently passed bills aimed at fighting and treating the opioid epidemic. "This bill will save lives," said Rep. Hal Rogers, R-Ky., a top member of the House Appropriations Committee.

But the legislation failed to attract the support of conservatives, who were angered the GOP-led House, Senate and White House were not able to secure a deal with more Republican priorities. The border security funding, for example, cannot be used to construct a new southern border wall promised by President Trump.

The absence of language on the border wall is partly why Democrats praised the legislation as a victory for their party, along with the absence of language banning funding for Planned Parenthood.

Democrats had threatened to block the bill if so-called poison pill provisions were included, which would have provoked a partial government shutdown that typically spells political disaster for the GOP.

"They had the majority of the votes, but they also had the majority of the responsibility to make sure it was a unified decision that was made," said Rep. Jose Serrano, D-N.Y.

Ryan pointed out that the GOP was able to obtain more defense spending without an equal-sized increase on the domestic size, as had been tradition under President Obama. Overall defense spending was boosted by $25 billion in the fiscal 2017 spending bill over last year.

"I think that is one of the most important game-changing accomplishments that are in here," Ryan said. "That dollar-for-dollar parity rule is a rule no more."