The morning after the District ordered nonessential businesses to close on March 25, Langston Golf Course, along the Anacostia River in the shadow of RFK Stadium, opened as usual.

Brothers Daanish and Shaun Ali snagged the first tee time of the day. They try to play together once a week, usually meeting at the East Potomac course, a central point for Daanish, who is coming from Virginia, and Shaun, who is arriving from Shaw.

They also usually use a golf cart, but Langston wasn’t running any that day as a safety measure. So they walked nine holes (cost: $18), disinfectant wipes in their pockets. “When things were first shutting down, we were a little apprehensive about it,” Shaun said. “It’s different golf. It’s kind of eerie. But if you follow precautions, it’s fine.”

The brothers said they got some strange looks when they told in-laws and buddies what they were doing. “Friends that don’t play golf, they’re kind of freaked out,” Daanish said. “I don’t think we would come out if there was more interaction.”

Golfers are in a tricky spot these days. In many ways, the game is a perfectly constructed activity for our sudden new normal. The rules limit groups to four or fewer. It’s naturally socially distancing: Players have no reason to ever be within six feet of one another, if they don’t want to be.

Unsurprisingly, in the early days of the coronavirus outbreak in the United States, people flooded courses from New Jersey to Texas. The renewed interest in golf has also been good news for a sport that has suffered a decline, down from a peak of about 30 million players in 2005 to less than 25 million in recent years. And yet, getting in 18 holes remains fraught.

As more states and municipalities ordered nonessential businesses to close and residents to stay home, golf has become subject to a patchwork of restrictions. The sport has been banned in some states but remains permissible in others, including North Carolina, Iowa and Oregon.

The World Health Organization has advocated regular exercise. And with gyms and exercise studios closed and many residents lacking personal outdoor space, golf in theory is a good alternative, an opportunity for people to take a break from their screens and the constant news of death totals. “There are so many aspects of golf that kind of make it the ideal social distancing sport,” said Lucy Wilson, an infectious disease physician and professor at the University of Maryland Baltimore County.

But as with any activity that requires leaving the house these days, golf has inherent dangers. “I think the other aspects include, what are the invisible risks to others?” said Wilson. “Before you do any outdoor activity, consider the unintended consequences, whom it might also affect. Who is an essential worker that might have to respond to what you’re doing?”

The U.S. Golf Association has been walking a tightrope as it guides the 59 golf associations across the country through the crisis. Its headquarters are in Far Hills, N.J., about 30 miles west of New York City, where as of mid-April there were at least 156,000 covid-19 cases and nearly 12,000 confirmed deaths. “We have continued to tell our member clubs, our members, everyone in our ecosystem, that health and safety is our number one priority,” said Janeen Driscoll, USGA’s director of brand communications.

The organization has offered guidelines to protect players, such as discouraging them from removing flagsticks or touching sand trap rakes. Courses can even raise cups or wrap flagsticks to keep balls from going into cups, which in turn keeps players from reaching into them to fish out their putts. It has also given assistance and training to groundskeepers who have to maintain closed courses, so that whenever they do reopen, they’ll be ready. “Golf has always been this great escape,” Driscoll said. “But we are not doctors. We’re not health professionals.”

Golf is unlikely to strike many as an essential activity during a global pandemic. It’s a game often associated with the rich as well as an avatar for the cluelessness and selfishness of presidents in times of crisis. But in the United States, about 75 percent of golf courses are open to the public, and the average greens fee is $39, according to the USGA. At many municipal courses, it’s far less.

In the District, the official opinion of golf’s safety as a recreational activity has shifted multiple times. The city’s three public golf courses — Langston, East Potomac and Rock Creek (which was closed for the winter) — are on federal land under the purview of the National Park Service. The East Potomac course was temporarily closed to discourage visitors to the cherry blossoms at the Tidal Basin, but officials had planned to open it once again like Langston. However, the NPS ordered the courses closed upon Mayor Muriel Bowser’s stay-at-home order, which shuttered nonessential businesses. That March 30 order included an exemption for golf (among other activities), so the NPS gave Golf D.C., which oversees the courses, the go-ahead to start prepping courses to reopen April 8 with safety precautions. But then on April 8, the mayor’s office reversed course, striking both golf and tennis from the allowable list of activities through at least May 15.

Bowser’s office said the initial list of acceptable sports was decided upon by a team of experts, including LaQuandra Nesbitt, the director of the D.C. Department of Health. When asked if there was a specific reason for the change, a spokesperson replied that “Mayor Bowser along with her advisers continues to monitor and assess the development of covid-19 in the District” and that “this order takes another step to ensure D.C. residents are safe and stay home.” In mid-April, Golf D.C. was asking golfers to contact the mayor to try to get the links reopened.

Back at Langston, Ricardo Dyson played nine holes alone, without his usual playing partner, on the same morning as the Ali brothers. A mail carrier for more than 20 years, Dyson is still very much at work these days. He was out on the course on a Thursday because it was so slammed Sunday that he was given a rain check.

“This might be the one thing that you can do,” he said. “You aren’t exposed to anybody. Nobody touches anybody.”

Noah Frank is a writer in Washington.