SAINT-TROPEZ, France — The party was on in this hedonistic playground this summer — until it wasn't.

Last week, two of the French Riviera resort’s hot spots — Indie Beach House on Ramatuelle’s Pampelonne Beach, and Pablo, a trendy bistro on Saint-Tropez’s Place des Lices, both owned by the same company — were shut down when four staff members reportedly tested positive for the coronavirus. Since then, authorities have reported that 20 of Pablo’s 30 employees and one of Indie Beach’s have been infected with the virus that causes the disease covid-19.

Another eatery, Noto, which describes itself as a “festive Italian restaurant” on the Place des Lices, was shuttered Monday for two weeks after six employees tested positive. And the regional health agency recorded 64 cases on the peninsula between July 25 and Aug. 1.

Meanwhile, on Thursday, the local prefecture closed two other hopping Pampelonne Beach clubs — Moorea and Verde — for not respecting social distancing rules. Indeed, on the eve of the closure announcement, Verde’s thumping music and the cheering of the crowd could be heard a mile away.

Masks are 'not sexy'

Because “the virus affects with a particular sensitivity the municipality of Saint-Tropez, which has a significant flow of tourists each summer, especially in its city center,” and because “physical distancing rules cannot be guaranteed day or night” in public areas because of the “high concentration of people,” the prefecture began requiring masks throughout Saint-Tropez on Saturday. Saint-Tropez Deputy Mayor Sylvie Siri told the local daily, the Var-Matin, that she hoped the measure would “serve as an electroshock” to reckless vacationers and business owners alike.

“Wearing masks [is] not a sexy look, that’s for sure,” said Patrice de Colmont, owner of the famous beach retreat Club 55. And it’s the antithesis of all that Saint-Tropez represents.

The charming fishing port and the surrounding villages have been a jet-set destination since the 1950s, when French director Roger Vadim filmed the erotic “And God Created Woman,” which starred his wife, the ingénue Brigitte Bardot, in the village and on neighboring beaches. It was long a favorite spot for nudists in secluded coves; in the 1970s, topless sunbathing became de rigueur on the three-mile-long Pampelonne Beach. And in recent years, the holiday haven has attracted such bling-y tabloid favorites as Ivana Trump, Naomi Campbell and Johnny Depp. Just last week, Piers Morgan and Joan Collins were spotted here.

But this summer, with the European Union banning travelers from the United States and Russia — two of Saint-Tropez’s top visitor homelands — the crowds have been heavy with middle-class French, who forsook their traditional vacations in less-costly locales such as Spain or Greece and opted for a summer road trip to France’s southern coast. Once E.U. borders reopened in mid-June, Danes, Germans and the Dutch joined the caravan, many in RVs. And when they arrived, after three months of sheltering in place, they wanted to kick back and forget about the virus.

Follow the arrows

During lockdown, the Var region, which is the second most visited by tourists in France, after Paris, and includes Saint-Tropez, reported few cases. The town appeared to be a sunny, coronavirus-free bubble on the Mediterranean. And when restaurants and beach clubs reopened in early June, they reduced seating and required staff to wear masks.

At Club 55, Colmont reorganized the pedestrian flow, instituting a one-way system with arrows, like those in an Ikea store. He created a hand-washing and sanitizing station at the entrance for guests, and another inside for employees. Deliveries are made in a tented antechamber in the parking lot, so no outsiders enter the kitchen.

He cut seating by 170 in the restaurant and significantly reduced the number of mattresses on the beach. He brought in the French government’s local occupational medicine specialist to speak to staff about coronavirus risks, and he had everyone tested.

Every morning at 5, he has a professional cleaning crew disinfect the space, down to the door handles. And he printed a handout that explains what the club has done to make the establishment as safe as possible. “It’s a matter of respect — for guests and for employees,” Colmont said Saturday morning as staff readied for lunch service. “Simple as that.”

As the summer progressed, some restaurants and beach clubs loosened up on the rules. Live music during dinner service brought mask-free dancing, which management shrugged off. With nightclubs such as the VIP Room and Les Caves du Roy padlocked for the season, some beach clubs became daytime discothèques, with waitstaff wearing masks on their chins — or not at all. In late July, Nikki Beach came under fire after videos circulated on social media of hundreds of unmasked partyers cavorting to music by French DJ Kungs.

Watching for police

After the local authorities stepped up enforcement, some clubs hired “guetteurs,” or lookouts, who are posted at beach-road entrances and call the maître d’ when the gendarmes drive up for spot inspections. Down goes the music, up go the masks.

Visitors have been just as cavalier. At outdoor markets, few shoppers wear masks, and the traditional air kiss is back in vogue. At cafes, patrons crowd around small tables and blow cigarette smoke in others’ faces.

At Club 55, when guests were asked to wear a mask to walk through the interior common area to the restrooms, Colmont said “one out of two refused.” Some even threw the masks on the ground. Now, when anyone asks for a mask, Colmont responds: “We do not distribute underwear, socks or masks.”

Then came the outbreak. And the closures. And the new mask regulations, which the Var-Matin charmingly dubbed the “Bal Masqué,” or masquerade ball. On Saturday, the paper reported two more fashionable restaurants in town — the Salama and the Gaïo — had closed shop, and Siri, the deputy mayor, said the sub-prefect “envisions other closures as a preventive measure if health measures are not more effectively put in place.”

It may come to that. “I can’t believe how lax people are about wearing masks here,” Anna Jestin, a 22-year-old Parisienne, said when she arrived at the Saint-Tropez port by ferry from Saint-Raphaël.

“Or should we say chin guards?”