Copyright The New York Times

There’s no sign, as you drive the sun-broiled highway down Egypt’s Mediterranean coast, that announces where the Good Coast ends and where the Evil Coast begins. Good or Evil, the waves are the same pure turquoise, the sands the same flawless white. But for Egyptians who summer on the North Coast, migrating there from Cairo just as New Yorkers converge on the Hamptons and Michiganders go up north, there is no mistaking which is which. There’s Sahel el-Tayeb, or the Good Coast, as Egyptians call it. Simple, wholesome vacations, with little to do but play in the sea, read and relax. Body-covering burkinis and hijabs on most women. Unpretentious hotels and rental houses. Simple beachside cafes with plastic chairs and a few fresh seafood joints dotting the coastal highway. Every few minutes, hawkers pass the beachgoers’ colorful umbrellas with honeyed wafers called fresca and trays of clams, the time-honored snacks of Sahel summers. And then there’s Sahel el-Shireer, or the Evil Coast. Million-dollar beachfront villas and Louis Vuitton bags by the sun loungers. J. Lo concerts and raves where Peggy Gou is D.J. Waterfront outposts of Cairo’s most upscale restaurants and boutiques. Bikinis, designer sunglasses and boho-chic cover-ups on most women. Less than an hour’s drive west from Good Sahel, the same fresca wafers and clams cost more than twice as much, and for the price of a weekend stay, you could splurge on a trip to St.-Tropez. The class gap became harder than ever to ignore in 2022, when Egypt’s already rickety economy crashed. Three years later, what’s left of the middle class can barely afford school fees and meat, let alone beach vacations. Around the same time, exclusivity in Evil Sahel was escalating to outright exclusion. Replacing a more informal system that allowed people to invite friends or family to the beach, gated communities began requiring QR codes issued only to property owners or renters for entry. Some demand another code for beach access. The codes have become such a hot commodity that people sell them online, generating mild controversy and, in due course, a TikTok trend. Developments in Good Sahel are also gated, but the rules are nowhere near as strict. “It’s like a border, seriously,” said Dalia el-Ghoneimy, 46, who was visiting Almaza in July for the first time. “The beach shouldn’t be like this. The beach, it’s for everyone.” Decades ago, it was. Rich or not, many Egyptians used to go to beaches around the Mediterranean city of Alexandria in summer. Many poorer Egyptians still do. But private developers have raced westward down the shoreline more recently, first opening modest resorts, then unveiling ever trendier developments farther west. These days, they also market to wealthy tourists from the Persian Gulf, Europe and anyone else who can afford it. (A one-week rental in peak season can run to $6,000 or more.) The developers’ glossy billboards loom over Cairo’s dusty streets and the coastal highway, selling a vision of immaculate summers: “Seazen — Find Your Zen.” “Forever by the Sea — Ras El-Hekma.” None of the smiling women cover their hair or arms; every ad is in English, a language that comes easily to Egypt’s international-school-educated elite. “These girls have parents!” Mr. el-Ashmawy, the longtime Good Sahel-goer, cried with dismay, as he recounted a national scandal in which two girls at an Evil Sahel concert were caught on video kissing the Lebanese singer on the cheeks. “It’s super, super free, and I don’t like it,” said Doaa Reda, 25, a teacher who was feasting at a fish restaurant next to the coastal highway, citing social media videos she had seen. “Egypt is a Muslim country. Parties and bikinis, this stuff really isn’t Egyptian society.” Many Evil Sahel-goers openly say its exclusivity is necessary to keep such moralizing at bay. The QR codes ensure that only “select people” — people who “have the same culture” — are allowed in, said Mahmoud Abdoun, 56, who works in interior design. He and his wife were sitting under an Almaza cabana facing the sea, which lapped the sand in warm, mesmerizing waves of celadon and turquoise. At a beach club to their right, pop music shimmered as waiters bent over loungers with frozen margaritas, yuzu avocado toasts and platters of fresh mango. A royal-purple motorboat that looked exactly like a racecar tore up the water; a parasail drifted by. Some parents cited the safety of a gated community. “You want to be able to relax and have your kids running around,” said Sherif Seif, 48, a marketing executive who was presiding over his son’s birthday party under a nearby cabana. Disentangling such opinions from class is never easy in stratified Egypt, and there are more than a few Egyptians, well-to-do and not, who see the restrictions as little more than institutionalized snobbery. At Green Beach, a gated community in Good Sahel, Radwa, a translator sitting with a book and wearing a mauve burkini, said she had never visited Evil Sahel. “I know I’d judge them,” she said. “But if I went there, they’d judge me because I dress like this.” (She declined to give her last name, not wanting to stir up social tensions.)