(CNN) The House voted Thursday to approve a spending bill with $1.6 billion to put toward a border wall along the US-Mexico border, part of a high-profile campaign pledge from President Donald Trump.

Despite Trump's pledge to make Mexico pay for the wall, the bill earmarks taxpayer money to construct a carrier along the southwest border. To avoid having those Republicans who oppose the measure vote on it directly House Republican leaders tucked it into a procedural measure that set the debate plan for the so-called "minibus" funding bill for several federal agencies.

The bill passed 235-192 mostly along party lines.

The wall funding was added to a measure that combined funding bills for the Pentagon, energy and water, legislative branch, military construction and Veterans Affairs.

The $658 billion defense spending legislation was $27 billion more than Trump's budget request, and would provide the military additional fighter jets, ships, helicopters and troops that the Pentagon had requested.

While the wall funding was the most contentious piece of the appropriations bill, it was just a small sliver of the spending package the House approved.

The defense spending bill also conforms to the House's budget outline, but it violates the Budget Control Act spending caps commonly known as sequestration. The Senate is not planning to give the military the same level of funding unless the caps are lifted, which would require congressional action.

Senate Democrats are demanding equal increases to domestic and military spending in any funding agreement, a debate that will heat up closer to the October 1 deadline for Congress to fund the government.