The House on Thursday approved the first appropriations bill of the year, a measure that spends $51 billion on the Departments of Commerce and Justice, NASA and other related agencies.

The spending bill, H.R. 5326, was approved in a 247-163 vote in which eight Republicans voted against it, reflecting opposition to the amount spent in the bill. But it also picked up the support of 23 Democrats.

Republicans voting against the bill were Reps. Justin AmashJustin AmashWatchdog files Hatch Act complaint against Sanders for picture with Kanye in MAGA hat Cook Political Report shifts 7 more races towards Dems Rand Paul ramps up his alliance with Trump MORE (Mich.), Paul BrounPaul Collins BrounCalifornia lawmaker's chief of staff resigns after indictment Republican candidates run against ghost of John Boehner The Trail 2016: Let’s have another debate! MORE (Ga.), John Campbell (Calif.), John Duncan (Tenn.), Jeff FlakeJeffrey (Jeff) Lane FlakeTrump boosts McSally, bashes Sinema in Arizona Watch live: Trump speaks at Arizona rally Mnuchin to attend anti-terror meeting in Saudi Arabia following Khashoggi disappearance MORE (Ariz.), Trent FranksHarold (Trent) Trent FranksFreedom Caucus members see openings in leadership AP Analysis: 25 state lawmakers running in 2018 have been accused of sexual misconduct Jordan weathering political storm, but headwinds remain MORE (Ariz.), Cynthia LummisCynthia Marie LummisLobbying world Female lawmakers flee House for higher office, retirement Despite a battle won, 'War on Coal' far from over MORE (Wyo.), and Tom McClintock (Calif.).

ADVERTISEMENT

The bill is among the least controversial of the 12 annual appropriations bills but has little chance of becoming law on its own. The White House has said President Obama will veto any and all of the 12 bills until the House renounces the top-line spending level in the overall budget written by Rep. Paul RyanPaul Davis RyanPelosi, Schumer: Trump 'desperate' to put focus on immigration, not health care Trump urges Dems to help craft new immigration laws: ‘Chuck & Nancy, call me!' Sanders, Harris set to criss-cross Iowa MORE (R-Wis.).

The legislation cuts spending by about 3 percent compared to current levels, which Republicans said shows their ongoing commitment to trim spending. The GOP said spending by agencies covered by the bill has been cut by 20 percent over the last three budget cycles.

But similar to last year, Republicans were often split over proposals to cut further. During amendment debate, younger Republicans — including some associated with the Tea Party movement — offered amendments that would have chopped at least $3.5 billion more, but nearly all of them were defeated with the help of senior Republicans.

Among these were proposals to cut $1.2 billion from the National Science Foundation, and several amendments to cut all salaries and administrative expenses by an additional amount.

While Republicans split on these ideas, they came together in support of several funding limitations, particularly those that limited the authority of the Justice Department and Attorney General Eric HolderEric Himpton HolderTrump rebukes Holder, Clinton with 'jobs not mobs' refrain Eric Trump calls out Holder on kicking comments: 'Who says this?' Two Minnesota Republicans report attacks MORE.

One of the more controversial amendments added to the bill would prevent Justice from using taxpayer funds to lie to Congress. That language, from Rep. Jason ChaffetzJason ChaffetzFox News contributor mocks Elizabeth Warren with photo at Disneyland Eric Trump blasts professor at alma mater Georgetown: ‘A terrible representative for our school’ Matt Schlapp: Trump's policies on Russia 'two or three times tougher than anything' under Obama MORE (R-Utah), was a reaction to GOP arguments that Justice lied to Congress about its involvement in a gun-walking program that allowed weapons to leave the United States, one of which was later used to kill a U.S. border patrol agent.

Chaffetz said during debate that Justice's purposeful decision not to tell Congress the truth about the "Fast and Furious" program was "wholly unacceptable," and his amendment was passed easily 381-41 with the support of 142 Democrats.

The House also voted to cut $1 million from the Justice Department in retaliation for the department's failure to come clean about Fast and Furious.

Additionally, members approved amendments preventing Justice from defending the 2010 healthcare law, suing states with voter ID laws and taking action against state immigration laws.

Erik Wasson contributed to this report.

Updated at 3:49 p.m.