The bloodshed here has not targeted tourists and has mostly occurred out of their view, in the poorer quarters of San José del Cabo and Cabo San Lucas, the main towns in the municipality of Los Cabos. Much of it stems from a battle among criminal groups for control of trafficking routes in the Baja California Peninsula and for dominance of local criminal enterprises, particularly the drug trade servicing tourists.
But the violence, community leaders and social workers say, is also a symptom of the grave problems that afflict the region’s underclass, reflecting longstanding government neglect. While the authorities have for decades thrown their weight behind the development of the tourism sector, many of the needs of the poor and working class have languished, they say.
Los Cabos, they say, risks following the same path as Acapulco, the Pacific Coast city that was once a major vacation destination but has been devastated by drug violence.
“If they continue covering up the problems, things aren’t going to get better,” said Silvia Lupián Durán, the president of the Citizens’ Council for Security and Criminal Justice in Baja California Sur, a community group. “It’s a breeding ground for worse things.”
There is much at stake. Last year, Los Cabos had more than 2.1 million visitors, 75 percent of them international travelers and the vast majority from the United States, said Rodrigo Esponda, the managing director of the Los Cabos Tourism Board. The average cost of a hotel room is around $300 per night.
For most of its modern history, the region was sleepy and isolated, accessible only by boat or private plane. But with the completion of the Transpeninsular Highway in the 1970s and the expansion of the local airport, development exploded — and with it came a rise in migration as Mexicans poured in to work in construction and as chambermaids, bellhops, cooks, waiters, bartenders and landscapers.
In 1990, the municipality’s population was about 44,000. By 2015, it had climbed to about 288,000, with many people working in jobs that directly or indirectly supported tourism.
“There was no sane planning for where all the working people were going to live,” said Ramón Ojeda Mestre, the president of the Center for Integral Studies of Innovation and Territory, a consultancy in Cabo San Lucas.
Most of those working-class migrants have settled in gritty neighborhoods carved out of desert scrubland that stretches north from the narrow coastal strip where the hotels, golf courses, nightclubs and marinas are concentrated.
In many of these neighborhoods, the best homes are simple one- or two-room cinder-block structures with corrugated metal roofs. The worst, often in illegal settlements called “invasions,” are assembled from scrap building materials and tarps, tree branches, sticks and even cardboard. By the municipality’s estimates, about 25,000 people live in such settlements.
Overcrowding is common, and public services are spotty or nonexistent.
Most of the neighborhoods have no sewer systems, and many homes are not hooked up to the municipal water supply. Even those that are connected often find their pipes empty: Demand has far outpaced supply, forcing the rationing of municipal water delivery and compelling residents to buy water at inflated prices from tanker trucks that ply the unpaved roads.
“There’s a first world, and there’s a fifth world,” said Homero González, a political organizer, during a recent visit to the Caribe neighborhood, a settlement in Cabo San Lucas. Roving packs of dogs wandered among piles of rubble, drifts of trash and the husks of stripped cars no more than three miles from the manicured grounds of the resorts where many residents work.
As living standards go in these communities, Maria Salazar isn’t doing so badly. She lives with her four children and her boyfriend in a one-room, cement-block house in the Real Unidad neighborhood in Cabo San Lucas. She is a community leader and peddles homemade flavored ices and candy to help make ends meet; her boyfriend brings in $14 a day as a freelance construction worker. They don’t have plumbing of any sort, though after years of pirating electricity, they were finally connected to the regional grid.
“I heard a lot about ‘the change,’ ‘the change,’” she scoffed, referring to the last round of regional elections in 2015. “And now we’re seeing the change: all these massacres.”
Municipal officials blame past administrations. In an interview, Álvaro Javier Ramírez, the director of planning and urban development, acknowledged that over the years the authorities had put a disproportionate emphasis on supporting the tourism sector.
“Historically, cash is king,” Mr. Ramírez said. He added, referring to previous municipal governments: “They ignored the needs of the working-class neighborhoods. The shortfalls are many.”
The inequalities gnaw at the working-class population, though any inclination to lobby the authorities to fix the problems is undermined by a sense that the system is rigged. This is the fertile environment of discontent in which criminal gangs have seeded their operations, recruiting members, buying allegiances and cultivating markets, community leaders say.
“If the young people don’t have anything to work toward, they will look for other options,” said a close relative of Edwin López, the murdered teenager, requesting anonymity for fear of retribution by public officials and the drug gangs. “We need a government here that worries more for the urban population than for the tourist zone.”
In the first seven months of this year, the government opened 232 homicide investigations in Baja California Sur, most of them in Los Cabos, and some involving multiple victims. During the same period last year, there were 65 homicide investigations. In a nation that has seen homicides surge to record levels this year, Baja California Sur now has the fifth highest rate among Mexico’s 32 states.
The jump in killings in Los Cabos — accompanied by a rise in other crimes — has pitched residents into a state of fear they say they have never felt before.
No neighborhood, it appears, has been hit as hard as El Zacatal, in San José del Cabo, where homicides have become depressingly familiar.
A recent drive through the area with Concepción Garate, a hairdresser and longtime resident, became a guided tour of loss. She pointed out the convenience store where four people were killed, the house that was strafed by gunmen, another house where gunmen murdered a family.
“A barber was cutting hair there,” she said, pointing to a barbershop. “They killed him while he was cutting hair!” The tour continued: two dead in front of a school, three in a taqueria, three others in a tire repair shop, one in a carpenter’s workshop.
“El Zacatal is hell,” Ms. Garate said.
Leaders of the tourism industry and public officials have tried to forestall damage to the area’s appeal to visitors, particularly after the State Department advisory, pointing out that tourists have not been the target of the homicides.
But from time to time the violence has interrupted vacation idylls. In August, gunmen stormed a beach near a resort where rooms can go for thousands of dollars a night, killing three people in what the authorities said was score-settling between rival criminal groups.
The federal government has deployed hundreds of marines and federal police officers to the municipality to confront the violence, and the national tourism secretary, Enrique de la Madrid, has announced a plan to create a special police force to help patrol tourism destinations, including Los Cabos, though the plan remains on the drawing board.
But in an interview with El Universal newspaper, Mr. de la Madrid also said the nation needed to do a better job redistributing tourism profits throughout society. “The enemy of Mexico is poverty and inequality,” he said.
The precariousness of lives in Los Cabos’s poor sections was starkly illustrated this month when Tropical Storm Lidia lashed the area, flooding neighborhoods, destroying scores of poorly built homes and killing at least six people.
The killings seemed to stop for a bit after the storm, but the peace was momentary. Days later, a 22-year-old man was shot and killed in San José del Cabo, steps from an elementary school. The drumbeat of murder continued.