The House of Representatives on Wednesday voted to cut funding from key climate protection rules and rejected an attempt to save regional offices of the Environmental Protection Agency from being closed.

But lawmakers voted against an amendment to cut $1.9 billion from the EPA's budget, which would have dealt a devastating blow to the beleaguered agency.

Offered by Rep. Ralph Norman, a Republican from South Carolina, the amendment's cuts would have come close to the 31 percent reduction sought by President Donald Trump. The House bill does cut more than $530 million from the agency's $8 billion budget, slashing it to less than the agency was spending in 2006.

The votes came as lawmakers worked their way through a broad spending package for the 2018 fiscal year, which begins in October. Final passage by the House will likely come Thursday, but any differences with a Senate version will need to be reconciled.

The bill contained hundreds of amendments, many of them "riders" of the kind attached to appropriations bills to score policy points. Dozens of these proposals have drawn criticism from environmental groups.

Hewing closely to party lines, Republicans backed two amendments sponsored by Rep. Markwayne Mullin (R-Okla.). One would prevent funds from being used to enforce an Obama-era rule that limits methane pollution from new oil and gas facilities. The other effectively prohibits the EPA from factoring in future damages from climate change—a calculation known as the social cost of carbon—in weighing the costs and benefits of its rules.

Earlier this year, President Donald Trump issued an executive order to weaken the social cost of carbon requirements, and the administration has also attempted to stall or block rules limiting methane emissions. Republican support on the must-pass appropriations package backs up the administration, and, at least for the coming fiscal year, complicates any efforts by green advocacy groups to challenge the administration's rollbacks.

Lawmakers on Wednesday also voted down an amendment by Rep. Jared Polis, (D-Colo.), that sought to block the administration from closing or consolidating any of the regional offices of EPA.

Debate began on the package last week, but House leadership delayed some votes until this week so that some lawmakers could cope with the hurricane emergencies in their home districts.

Last week, during debate over these riders, lawmakers expressed their ongoing frustration that policy-related amendments are being tucked into must-pass spending legislation.

"These riders are best done in the policy committee, not on the appropriations bill," said Rep. Betty McCollum, a Minnesota Democrat, saying that Congress ought to hear from scientists and public health experts as well as the fossil fuel industry when making decisions. "I support science and I believe we should not abandon science while trying to tackle climate change."