The House has barred the Trump administration from building the first piece of a new border wall in a federal wildlife refuge.
Border patrol officials had said previously that the Santa Ana wildlife refuge had been intended as the starting point for construction of the wall and Homeland Security Secretary Kristen Nielsen toured the area last year.
In the spending bill approved by the House on Wednesday night, construction in the refuge was banned.
Let our news meet your inbox. The news and stories that matters, delivered weekday mornings.
"None of the funds provided in this or any other Act shall be obligated for construction of a border barrier in the Santa Ana National Wildlife Refuge," the legislation states. The bill must still be approved by the Senate.
Local officials and environmental activists opposed to the move had said the Santa Ana location was picked because it was "low-hanging fruit," essentially property the government already owned.
The Sierra Club issued a statement saying of the House bill, "while it preserves the Santa Ana Wildlife Refuge for the time being, it still risks people and places nearby. The threats are still very real and will be felt by communities."
The spending bill did allocate nearly $1.6 billion for border security, including repairs to existing fencing across the southwest border in Texas and California. But the legislation also states none of that will be the new "prototype" designs Trump inspected this month in San Diego.
The Department of Homeland Security did not respond to a request for comment from NBC News about the bill.