Women walk by the 18th hole after third-round play was suspended for the day at the PGA Championship golf tournament last month at Baltusrol Golf Club in Springfield, N.J. (Tony Gutierrez/Associated Press)

Will the last golfer on the course please turn off the cart?

This was supposed to be a glowing moment for golf, the aristocratic pastime and business ritual that helped transform America into a quilt of green links and country clubs. Golf returns this summer as an Olympic sport for the first time in 112 years.

Instead, the story of golf looks increasingly like a tale of surrender. Fifteen years after Nike’s star endorser Tiger Woods captivated the country and revitalized golf with a four-title “Tiger Slam,” the world’s biggest sporting-goods company said Wednesday it was closing its main golf division and waving the white flag, saying it can’t make money off the game.

Years of declining participation have damaged the sport’s future and mired its top businesses in sand traps. The number of U.S. golfers who played at least one round a year has dropped from 30 million in 2005 to 24 million last year, the lowest level since the mid-1990s, data from the National Golf Foundation show.

Even worse: Participation by young golfers, ages 18 to 34, has plunged 30 percent over the past 20 years. An NGF survey found that 57 percent of American kids and teens thought negatively of the game; the top response was that it was “boring.”

About 90 percent of the spending comes from a core group of about 20 million golfers, and “the people who are committed to the game, i.e. the avid golfers, they’re playing golf,” said Steve Mona, chief executive of the World Golf Foundation, a trade group for the sport.

But NGF studies estimate that staggeringly few of the nearly 2 million Americans who played golf for the first time last year will stick around, learning the etiquette, buying the gear and joining the ranks of regular golfers needed to keep the game alive.

“How do you keep them still interested in it? How do you keep it fun? That’s one of the things we’re running into right now with the game of golf,” Woods told the Wall Street Journal in March. “It’s just stagnant. We have people come into the game but they exit the game. There’s no sustainability.”

Sales of Nike’s golf brand have fallen for three years straight to become the Swoosh’s weakest business, below women’s training and “action sports” like surfing and skateboarding. The company said Wednesday it would be “transitioning” out of its business in the golf clubs, balls and bags it had spent hundreds of millions of dollars paying Woods to use.

Even golf’s Olympics turn has been tarnished, with young stars Jordan Spieth, Jason Day and Rory McIlroy sitting out because of concerns over the Zika virus. McIlroy, age 27 and ranked No. 4 in the world, was particularly dismissive of calls for him to champion the game on a global stage.

“I didn’t get into golf to try and grow the game. I got into golf to win championships,” McIlroy told reporters last month. He added that he was “not sure” whether he would watch Olympic golf but said he would probably watch “track and field, swimming, diving … the stuff that matters.’’

Nike’s retreat brings to a dispiriting end its big bet on Woods, whose surprise stardom — a young minority who was thrilling to watch, he was everything the traditional top golfer wasn’t — made many think he was the future of the sport. In 1996, Nike signed the 19-year-old Woods to a five-year contract totaling $40 million. Five years later, Nike made him the world’s highest-paid golfer, with a new $100 million contract.

Woods’ game was derailed in 2009 by a sex scandal and a car crash outside his Florida mansion. Though he could still rack up wins in both play and endorsement deals — in 2013, he landed a beefy new Nike contract and a PGA Tour Player of the Year award — his stretch of thrilling victories never recovered. He is now ranked No. 647 in the world.

Nike’s golf revenue peaked at $792 million in 2013 and has deflated ever since, falling 8 percent year-over-year, to about $706 million, in the most recent fiscal year, company filings show. Its running brand made seven times as much revenue as its golf brand did last year.

The Oregon-based sportswear giant said it would still make golf clothes and shoes, with Trevor Edwards, president of the Nike brand, saying, “We’re committed to being the undisputed leader in golf footwear and apparel.”

Though its golf brand launched in 1984, Nike’s golf-club business always remained a bit player in the sport, with clubs that were routinely passed over in stores for companies such as Callaway and TaylorMade.

Nike’s main rival, Adidas, has also edged away from the game. The company is trying to sell its well-known golf businesses, including TaylorMade, which are trapped in a years-long slump. When TaylorMade’s sales plunged 28 percent in 2014, the company was forced to discount old golf gear and shelve new launches just to stay afloat.

“We misjudged the market,” Adidas chief executive Herbert Hainer told analysts then. “A decline in the number of active players, as well as high levels and slow liquidation of all the inventories, caused immense problems in the entire industry.”

Adidas says it's confident it can keep growing fast and improve profitability even though it's just reported its highest second quarter sales growth in a decade. Fashion is helping the German sportswear group. (Reuters)

As a business, golf will depend on new blood to survive as its traditional player base of older men ages out of the game. But the game presents barriers to entry that many other activities do not: It is tough to learn, expensive to equip for and demands a few hours just to play 18 holes.

City dwellers may think the courses are too far away, and amateurs may feel turned off by its complex rules and archaic traditions. (The Royal and Ancient Golf Club of St Andrews, the world’s most prestigious club, was closed to women until last year.)

A June report on the golf business by industry researcher IBISWorld noted a “high supply” of golf courses but “low enthusiasm” of customers, and pointed to a “waning interest in the sport among all but its eldest target demographics.” Fewer are searching for golf or its top stars online, too, Google Trends data show.

The golf industry is retooling the game from its timeworn 18-hole format with shorter nine-hole games and glorified nighttime driving ranges designed to attract new swings. Some in the industry have hoped young talented golfers, including Spieth and Day, could inspire a new generation in much the same way Woods did during the Tiger wave.

Mona, the World Golf Foundation executive, said a lot of millennials playing the game “like what we refer to as ‘golf plus’: We’re going to play golf, but we’re going to listen to music, have a few beers, whatever.” A lot of more-traditional golf-course operators, Mona said, “are, shall I say, adjusting to the changing times.”

There are some signs of optimism: The number of golf rounds played for the year so far are up about 5 percent, according to industry research firm Golf Datatech; some of the country’s golf hot spots, like Florida and California, are nevertheless trending down.

But the downturn has already left a disastrous mark on America’s operators of golf courses and country clubs, who must pay the same land and maintenance costs no matter how many golfers tee off. Edwin Watts Golf Shops, a four-decade-old golf chain in the Florida Panhandle, filed for bankruptcy protection in 2013, blaming a drop in golf’s popularity.

The game, nevertheless, retains a certain cachet with the elite. Republican presidential nominee Donald Trump joked this week that he would happily play President Obama for the White House. They may not have a problem getting a tee time, and golf’s supporters are perfectly fine with that.

“Golf has never been a populist sport,” said Tom Stine, the co-founder of Golf Datatech. “It’s not for everyone, and it’s not easily accessible. But that’s okay. That’s just the way it is.”