Back in those foggy early days of the pandemic, as nearly every part of American life stopped on a dime, golf course superintendents pulled out their flag sticks, parked their carts and closed their pro shops. Golf is a discretionary expense for most, and as the novel coronavirus threatened both lives and livelihoods, no one in the industry knew when it would be safe for golfers to come back to the course or who would be returning when it was safe.

“We’re talking about an $85 billion industry that basically shut its doors down,” said Suzy Whaley, president of PGA of America, which represents more than 29,000 golf professionals in the United States and runs the PGA Championship and Ryder Cup events. “We immediately knew we had to come up with some solutions for our members.”

Banding together, the industry lobbied lawmakers, worked with the Centers for Disease Control and Prevention to develop revised rules and guidelines and then worked to bring the nation’s sprawling network of 14,500 golf courses back into play.

Now, after surviving the spring, the golf industry is thriving, coming off a stretch of bustling activity with little precedent.

Golfers played 10 million more rounds in July than they did a year ago, a 20 percent increase. It’s the largest bump recorded since Golf Datatech, the sport’s leading market research company, started tracking the monthly numbers 20 years ago. Play was up 14 percent year over year in June and 6 percent in May.

Though analysts say some 20 million rounds were lost during March, April and May, the booming summer has more than made up for that deficit and rounds are up 3 percent from last year. The August numbers haven’t been tallied.

Equipment sales are booming, too. They reached $388.6 million in July, the highest single month that Golf Datatech has recorded since it began tracking retail sales in 1997.

It’s quite a turnaround for the entire industry — the game’s busiest stretch following some of the slowest months that golf has seen. And, weather-depending, the stubborn pandemic may only help golf’s boom last deeper into fall. Those around the game say golf is particularly well-suited for pandemic life, offering players space, exercise and a much-needed distraction.

“I think it’s not only physical but a great mental release to go out and spend four hours walking the course,” said Greg McLaughlin, chief executive of the World Golf Foundation. It surely helps that the economy has begun to recover for the sport’s most reliable demographic: white men.

In mid-March, most of golf’s most influential organizations — including the World Golf Foundation, the PGA Tour, PGA of America, the USGA and LPGA Tour — teamed up to form Back2Golf. Pooling their resources, they reached out to governors of all 50 states to keep courses open, pleading the sport’s case as a pandemic-perfect outlet.

Rules and guidelines varied from state to state, even from county to county in some places, and were constantly changing. While government restrictions halted play in most places, many operators had to argue to keep maintenance workers and groundskeepers on hand to groom and maintain the courses.

“It was unlike anything we’ve ever seen,” said Kris Strauss, a senior vice president at Troon, which operates golf courses in more than 30 countries, including more than 40 U.S. states. “I don’t think we envisioned a worst-case scenario because we didn’t know the depths this could really go into.”

The We Are Golf organization then worked with the CDC to establish recommendations for a safe return to play, a phased-in approach that limited contact and modified some of the game’s basic practices, including barring rakes in and around bunkers, leaving flag sticks in the holes and limiting carts to one person unless players are riding with immediate family members or the cart is outfitted with a plastic partition.

The sport started stirring to life. Many courses started booking tee times in May, and in June the PGA Tour was the first major U.S. sport other than UFC to return to play. The industry almost immediately noticed there was a pent-up need.

Perhaps most encouraging for industry analysts are all the new players who have either discovered the game or returned after a long layoff. The National Golf Foundation estimates the number of junior golfers (ages 6-17) could increase by 20 percent, or 500,000 golfers, by year’s end. The number of new or returning players was up 20 percent in the first half of 2020.

“Sales of box sets — the junior sets and beginner sets — are terrific,” said Tom Stine, a partner with Golf Datatech. “They’re as good or better than they’ve ever been.”

Sales of balls, irons, wedges and gloves all set all-time monthly sales records in July. Because more people are walking, demand for shoes, pull-carts and lightweight bags have also never been higher.

While most numbers are up across the board, there are still corners of the golf world that are struggling. Strauss said many country clubs have seen strong membership numbers this summer, and courses that cater to a localized customer base are doing well. But resort properties and those that rely on tourists who travel great distances to play aren’t necessarily seeing an uptick in business, especially in places such as Hawaii that require a 14-day quarantine for visitors.

McLaughlin, who is also the president of First Tee, the youth development organization, said many young people are playing with family, but organized youth activities are down by 25 to 50 percent. The challenge will be making sure new players stick around the game, even after schools, gyms and other youth sports begin opening up their offerings.

“We’ve always done a really nice job of bringing people into the game. Unfortunately, in the past we’ve not been able to necessarily retain them,” said Zack Veasey, senior vice president of Global Value Commerce, the giant online retailer for golf gear. “I think that’s going to be the challenge for us: How do we pivot and make sure they become long-term participants?”

Around 98 percent of the courses are now open across the country. According to the National Golf Foundation, even with the dismal March and April numbers, the industry is anticipating that by year’s end, the number of rounds played could be 2 to 6 percent higher than last year’s 441 million.

“People are getting out for a variety of reasons,” Whaley said. “I think what you’d find is that many are less worried about the outcome. They’re less worried about their score. They’re enjoying being together, having some fun and just getting outside. I think it’s really helped people realize that golf is really fun, even if you don’t have your best day.”