America loves its national parks, but doesn’t seem to want to pay for them.

We see it in the routine underfunding that has left a multi-million-dollar backlog of maintenance issues. But there are also unprotected tracts of land within the borders of many national parks that the federal government can’t afford to purchase on its own.

That was the case for Antelope Flats, a 640-acre parcel within Grand Teton National Park boundaries that the feds had been trying to buy from the state of Wyoming to no avail for decades. But this year—demonstrating the chops of national park fundraisers and the willingness of private donors to step up when there’s a shared effort and a real threat—they pulled it off.

Just under the wire, the Department of Interior pulled together $46 million in private and public dollars to purchase the land, permanently protecting it from auction and potential development.

If you’re wondering how the government is forced to buy land within its own national park, it’s kind of a strange situation that started back when Wyoming became a state in 1890, and then when the park was established in 1950. Antelope Flats is what they call an “in-holding,” one of many chunks of land across the country, totaling about 2,000 acres, that the NPS doesn’t own due to longstanding property rights, even though they fall within park boundaries.

In this case, Wyoming owned it as part of its school trust lands established back when it became a state. Under the state constitution, such lands need to generate income for public schools, which currently face a large budget shortfall. After December 31, 2016, the state was authorized to put Antelope Flats up for auction and potential commercial development. For obvious reasons, a lot of people didn’t want that to happen, but the Department of Interior didn't have the money to buy the pricey Jackson Hole land.

Back in June of 2016, the state and feds came to a deal—if they could raise $46 million by the December deadline, the land was theirs for good. Half of the funds could be covered by the Land and Water Conservation Fund, but it was not easy to seal the deal.

The challenges included the fact that the State Board of Land Commissioners barely approved the transaction with a three to two vote. And there was the little hurdle of raising the money.

The president of the Grand Teton National Park Foundation, Leslie Mattson, has been given a lot of the fundraising credit, drawing individuals from all over the country to make donations to save the land. Big, early individual gifts from two couples got the ball rolling. The Jackson Hole Land Trust also gave $1 million. Substantial support also came from the NFWF, the Nature Conservancy, and foundations including the Knobloch Family Foundation and the Hamill Family Foundation. The cash was needed so quickly that the Packard Foundation even had to make a $9.5 million loan to cover pledged funds. All told, more than 5,000 individuals were involved in the effort.

The National Park Service is regularly hurting for funding and, although private donations have played a role in the park system since the beginning, it hasn’t historically drawn massive sums we see going to other environmental causes. We rarely see the mega-gifts to national parks that city donors give to their urban parks, for example, perhaps because it takes more to see an impact in such a sprawling system.

The National Park Foundation is trying to change that, currently rallying philanthropic support in an unprecedented campaign that has already hit more than $340 million.

The Antelope Flats victory shows how donors are, when the rubber hits the road, willing to cough up funds, perhaps inspired by the collaborative mix of money on top of the immediate threat.

Hopefully it doesn’t take such a threat to mobilize that kind of goodwill in the future, but it may again be called upon sooner than later. There’s another parcel owned by the state within Grand Teton that would be awfully attractive to private buyers.