For decades, golf course homes were sold as the ideal location for golfers and non-golfers alike — a place where one could have a permanently manicured view of greens, massive trees, and welcoming ponds fed by the results of unfortunate putts and drives.

Now that it appears the trend to build and maintain golf courses is fading, builders all over the country who find themselves running out of land in desirable locations are putting up new homes where golf has been falling out of favor. According to Kelly Pedro’s recent Realtor.com article, the sport has plunged in popularity from 30.6 million regular golfers in 2003 to 23.8 million in 2017, with figures supplied by the National Golf Foundation, a trade group.

“Aging baby boomers are dropping the sport en masse, and many millennials never acquired the fairway obsession in the first place,” writes Pedro. “Generation Z? Forget it.”

Golf’s misfortune, however, is becoming builders’ good juju, opening up some desirable acreage for new home developments in crowded cities and pricey suburbs. While there is no data currently available on how many of these courses have been transformed into residential communities, the trend is growing, as typical 18-hole courses offer 150 acres of rolling topography and it’s accompanying developer bliss.

“It’s an opportunity for builders to build closer in [to city centers and other more congested areas] and offer new-build homes in areas that are dominated by older homes,” real estate consultant Lesley Deutch, principal at John Burns Real Estate Consulting, was quoted as saying in the article. “Usually [they] have to build out in the suburbs. In South Florida, there’s very little land left, so golf courses provide a good opportunity.”

Around ultra-expensive cities, where land is at a premium, lush greens are getting new life as residential or mixed-use communities of homes and shopping may help to alleviate the crunch. Shuttered golf courses in Florida, once the golf mecca of the country, are now occupied by residential developments with hundreds of single-family homes, selling out inventory less than two years after the homes hit the market. Their success is the result of offering a seductive combo of attractive pricing in a pristine setting located close to city centers.

Experts predict that more of the nation’s greens will see a similar trajectory, according to Pedro, who cites how Minneapolis’ Star Tribune in Minneapolis reported last year that more than 900 acres of golf courses had been redeveloped in that city’s metro area between 2010 and 2016, much of it into homes.

The challenges of building on the carcasses of old golf balls is not as easy as one would surmise, however. Golf courses are havens for pesticides designed to keep their fairways green, the clean-up of which can be costly. And those rolling greens are not necessarily ideally graded for housing, often requiring an entire revamping of the area.

“Builders and developers also need to secure city zoning approvals to convert the space into residential housing,” writes Pedro. “Many are also confronted with not-in-my-backyard attitudes from neighbors who don’t want that beautiful, soothing green fairway they pass on their way to work each morning suddenly converted into housing, bringing in hordes of new neighbors.”

Whether the locals like it or not, however, more courses across the U.S. are calling it quits, freeing up tens of thousands of acres of hard-to-come-by land in prime locations.