The beaches of the Alabama Gulf Coast were still teeming with people last week. In one video, taken by an AL.com reporter Wednesday, teenagers and twentysomethings were seen packed on a narrow patch of beach, some stretched out in the sand, others clustered in groups. As the camera panned, the rows of towels and young people reached into the distance. There were hundreds, maybe thousands, of people there. “That’s mainly the point, is having fun,” one teenager told the reporter. He waved off a question about the coronavirus: “I think I’ve got a good immune system.”

Last week, as cities and states across the country recommended—and even ordered—people to stay home, videos like this circulated on social media, of drunken students partying on warm beaches in huge crowds. Most partied in resort towns in Florida, but several of the photos and videos originated in the small beach towns of Alabama. Spring break, for those students, had gone forward as if there was no such thing as COVID-19.

Gulf Shores and neighboring Orange Beach have for years pitched themselves as family-friendly alternatives to more party-oriented scenes in Florida, but college students still arrive in large numbers, along with families seeking to entertain children out of school for the week. Gulf Shores’ permanent population is around 12,000, but the town swells to as much as 12 times its size during the peak of spring break season, with an additional 100,000 to 150,000 people. Even with the threat of the coronavirus—until just days ago, when the state finally stepped in and closed the beaches—this year looked like it would be no different.

Vacationers had arrived from all over, particularly the Midwest. Ike Williams, the founder of an equipment rental company called Ike’s Beach Service, said that because of the sunny weather, business had been doing unusually well this year. “We were destined to have one of our best spring breaks we’ve had in a long time,” he said.

For the past few weeks, as the town transitioned out of its sluggish winter season and into its bustling spring break season, locals found themselves in a difficult position. The coronavirus raged across the world. The rest of the country was shutting down. And locally, business was booming. City officials needed to make a decision: cut the town off from its economic lifeblood or allow crowds to spread germs with abandon.

Uncertainty settled in. Restaurants, ice cream parlors, swimsuit shops, and bars were left to make their own risk calculations. Chris Ybarra, a local restaurant owner, said he wouldn’t close until an order came from the governor. Without the spring business, he said, many restaurants risked falling too far behind to recover once the winter season hit. In the meantime, he would have to lay off most of his employees. And tourists had continued to come. In the week before the state started closing businesses, the vacation rentals had still been at 70 percent capacity, according to Kay Maghan, a spokeswoman for the local tourism bureau.

“We were going to go out with a bang today, since we may be quarantined,” one local said Friday. “And I think it was more like us locals and vacationers trying to hang on to what we know we are going to lose.” He said that the parties he had been to in the past week or so were already planned, and that he and the people he’d been partying with were just trying to “get it out of our system” before a crackdown.

The locals noticed that the crowds weren’t just the usual spring break ones. “There seems to be an influx of people saying, ‘Hey, if we’re going to be quarantined, why not go to the beach?’ ” Ybarra said. Hunter Harrelson, the owner of vacation rental company Beachball Properties, couldn’t say if people were really planning on self-quarantining; he could only say that a lot of parents seemed to be bringing their school-age children to town. “When the schools first started canceling, we had this onslaught of people making bookings,” he said.

Some locals had already started to worry about the crowds. One restaurant owner said she was still seeing “tons of people,” particularly in groups along the beach. “Even the putt-putt golf had some people there,” she said. “I’m concerned. I’m here too.”

On Thursday, to address the crowds, Gov. Kay Ivey closed all public and private beaches. (Florida followed not long afterward with a similar order. Neighboring Mississippi has not issued any such ruling.) At the same time, the state said that all restaurants and bars would be closed to dine-in customers.

The city embraced the state’s order. According to the mayor’s office, the reason was not just to stop crowds from gathering at the beach. “It’s more of a deterrent to prevent people from coming,” said Grant Brown, a spokesman for the city.

The biggest problem for the city is resources. Gulf Shores has been bolstering its public services to compensate for recent growth in year-round residents, but the numbers can’t possibly account for spring and summer tourism. Like many tourist towns, the city only has the medical resources for its permanent residents, not the peak of its busy seasons.

Greg Alexander, the CEO of the Coastal Alabama Business Chamber, said he also felt saddened by the decision to close the beach but that he supported the measure. “We know that, being a tourist destination, as long as we’re open, we’re going to be getting people in from all over the country, carrying who knows what and possibly leaving it with the residents when they go home,” he said. “There was a feeling of ‘Oh, it’s not going to happen to me, so we’re coming to the beach.’ ”

Brown, the city spokesman, said that there has not yet been a confirmed case of a tourist with COVID-19. But he sees it only as a matter of time before they can test for the virus’s presence and discover that it’s already in the community. “It’s here, we know it’s here,” he said. “Just right now, we’re not testing our population as much.”

One woman who went to Gulf Shores for a bachelorette party last week said that her party arrived just as the mood seemed to shift in the town. She and her friends went out on March 14 and encountered a concert with a “huge crowd.” No one was worried at that point, she said. But two days later, they had found that most of the restaurants were closing early. “On our drive home on Tuesday was when concern started to kick in,” she said. Still, when they checked out of their house that day, another group checked in after them.

Harrelson believes the turning point for the area’s thinking about the coronavirus came not from any reports in the news about the progression of the pandemic but when President Donald Trump changed his talking points. Before then, “everything was still looking pretty good,” he said. A couple of weeks ago, “we probably had three or four cancellations but made 20 reservations. The president came out Monday and showed more concern—typically, Trump is very bullish, very aggressive and strong and ‘America first.’ And for the first time in his presidency, we’ve seen him looking concerned about something.” Harrelson said that the tourists who visit from out of town do still typically come from conservative areas. “Those people are going to follow what the president says probably more than others would.” After the president’s address, he said, 22 people canceled their reservations.

As the beaches have closed, the scene in Gulf Shores has changed. Some spring breakers have been forced out: Several condos have started kicking people out of their rental properties, shaking off even the most determined tourists who might substitute the beach with poolside lounging.

And some local business owners have remained optimistic that the restrictions will be brief. A large three-day music festival set for early May is, for now, still going forward. Restaurants are hoping they will be able to limp through the closures with carryout orders until they can reopen and rehire. Several locals also expressed optimism that the community could make it through the pandemic precisely because most long-term residents have experienced several destructive events already: a number of hurricanes and, 10 years ago, an industry-crippling oil spill. “Our community is different, and very resilient,” Williams said. “This is just one of those things we’re going to work through.”

But Robin Young, a server at a local restaurant who lost her job Thursday, knows that for people like her co-workers who live paycheck to paycheck, even that won’t be enough. Still, she feels conflicted. She has seen crowds of college students, and she has seen large numbers of tourists who arrived from cities like New Orleans with considerable outbreaks. “We need them to stay in business, but we don’t want them, at the same time.” She, like everyone else, is aware that the area doesn’t have another industry to fall back on. “So we’re damned if we do, we’re damned if we don’t.”