The spending bill President Donald Trump signed on Friday, which includes just a fraction of the money he'd demanded for a wall on the U.S.-Mexico border, was a major political defeat on its face. But the fine print shows secondary capitulations: In addition to allocating only $1.37 billion for the wall, the bill includes limitations on where it can be built.

Rep. Henry Cuellar, a Texas Democrat, was behind the provisions in the bill that effectively turned some areas along the Texas border into no-wall zones.

“I was able to talk to my Republican friends, senators and House members, about why this was so important,” Cuellar said. “So I think those conversations worked. So we got five protections that were so important.”

The agreement came after Trump shut down the government for 35 days in an effort to secure $5.7 billion to build his long-promised wall along the southern border. After giving up on strong-arming Democrats into agreeing to the funding, he signed a spending bill to keep the government open last week — but simultaneously declared a state of emergency over immigration to unlock $8 billion in funds for the wall.

The five areas the federal government isn’t allowed to build are: the Santa Ana Wildlife Refuge, the Bentsen-Rio Grande Valley State Park, the La Lomita Historical Park, the National Butterfly Center, and within or east of the Vista del Mar Ranch tract of the Lower Rio Grande Valley National Wildlife Refuge. All of these locations have been named in border wall–related lawsuits.

One of the more notable suits was over land owned by the Roman Catholic Diocese of Brownsville, Texas. The land is home to the historic La Lomita chapel, which dates back to the late 1800s and inspired the name of the town it sits in: Mission. The diocese claims that the wall, if built in its proposed location, would have cut off the community that worships at the chapel, according to lawyers representing the church. The brief “argues that the wall is fundamentally inconsistent with Catholic values and would substantially burden the free exercise of religion by preventing or restricting access.”

Daniel Flores, the bishop of the Diocese of Brownsville, said in a statement to VICE News that he was “grateful” for the bill’s protection. “It is commendable that the authors of this bill recognize the significance of the La Lomita chapel to the Catholic community and to the historical and cultural heritage of the whole Rio Grande Valley,” he said.

The lawsuit brought by the diocese in October 2018 specifically aimed to limit the federal government from even stepping foot on the property to survey the land where they wanted to build the wall. One lawyer in the case, Mary McCord of Georgetown Law’s Institute for Constitutional Advocacy and Protection, said Friday the diocese expects the government will no longer seek to survey the property.

Cuellar thinks part of the reason he was able to secure the protections was that the committee negotiating the spending bill allowed an open line of communication between Democrats and Republicans in Congress as well as with the administration. He said he even thanked Acting White House Chief of Staff Mick Mulvaney for listening to his concerns when he brought it up at a rare bipartisan Camp David meeting that Mulvaney held a few weekends ago with members of Congress.

“I said, 'Look, we're just trying to make people understand that in my area you just can't run over private property rights and some of those sensitive areas like the National Butterfly Center and other areas,’” Cuellar said. According to Cuellar, Mulvaney was a partner in working out language on the protections. Mulvaney had not confirmed this to VICE News by time of publication.

Cuellar also inserted a provision into the law that forces the Department of Homeland Security to confer with local elected officials of certain cities in Texas and “seek to reach mutual agreement regarding the design and alignment of physical barriers within that city.” It bars wall construction while the consultations are ongoing. Cuellar hopes this can be a model of how DHS works with localities going forward to decide where barriers can be built.

While these provisions were small wins for the Democrats, places like La Lomita and the butterfly center are still not completely shielded. Any money the president may have access to because of the national emergency declaration is not covered by the bill Congress just passed. But as 16 states and several groups including the ACLU and the Center for Biological Diversity have already filed lawsuits to stop the emergency declaration, they’re unlikely to see construction any time soon.