MEXICO CITY — In handwritten signs and graffiti, protesters made clear their anger at the influx of foreigners who have recently settled in Mexico City: “Gringo, go home!” “Speak Spanish or Die!” “Gentrification is colonization!”

In the protest, which took place Friday, gathering spots for remote workers were ransacked. That drew a condemnation from Mexican President Claudia Sheinbaum on Monday morning.

But Sheinbaum also acknowledged the demonstrators’ concerns, and how tempers are flaring in Mexico City, North America’s largest metropolis, over the arrival of thousands of relatively well-off foreigners, especially from the United States. Many longtime residents are fuming over rising rents and food prices in parts of the city.

“The playing field is not level,” said Daniela Grave, a resident attending the protest. “If they make a living in dollars, and don’t pay taxes here, we are just in unequal circumstances, Mexicans and foreigners, where those who have salaries in dollars have all the power to exert in this city and that is what should be regulated.”

Tensions over the influx have been building for some time. Foreign remote workers began relocating in large numbers to Mexico City during the coronavirus pandemic, settling largely in central, pedestrian-friendly neighborhoods like Condesa and Roma.

Jarring many longtime residents, more English than Spanish is spoken in some sidewalk cafes in these areas, and in which co-working spaces, Pilates studios, specialty food stores and clothing boutiques have sprouted, catering to the recent arrivals.

One of the main concerns that protesters are voicing has to do with surging rents and the value of real estate. Grave, 34, who has lived in the Roma Sur area for two decades, said she had watched her once quiet, family-oriented neighborhood undergo a slow but extreme transformation.

Corner grocery stores and affordable eateries have been replaced by upscale restaurants and curated art galleries. Even the local market where she buys produce has grown more expensive, often crowded with tourists and guides.

At neighborhood restaurants, she noted how servers are now expected to speak English to serve foreign customers. Apartment buildings around her have turned into Airbnb hubs, some hosting late-night parties that, she says, have “changed the entire atmosphere of the neighborhood.”

Grave, who joined the recent protest with her mother, emphasized that she didn’t have a problem with foreigners, and Americans in particular. But she expressed concern over the economic imbalances created when people with far greater purchasing power drive out longtime residents.

Other residents say that some privileged foreigners living in Mexico City could take important steps to ease their neighbors’ concerns.

Luis Sosa, 44, a creative director who has lived in Condesa since 2006, said Americans who move to Mexico could make more of an effort to understand the culture of the country. They could “be good neighbors, starting with learning Spanish,” he said.

Sosa, who did not attend the protest, said he understood the frustration many residents felt, but rejected the violent, xenophobic tone of recent demonstrations, which he said echoed anti-migrant sentiment in parts of the United States.

Instead, he pointed to real-state developers capitalizing on rising demand and speculation, driving up rents, and to politicians who have failed to regulate the trend through public policy.

“We are directing anger at the wrong places,” he said. “What’s unacceptable is leaving it entirely to market forces while politicians look the other way.”

Sheinbaum, a former mayor of Mexico City, said Monday that she disapproved of the protest while also criticizing the spread of gentrification in the city she used to govern.

“No matter how legitimate a demand may be, such as opposing gentrification, it cannot call for any nationality to leave our country,” she told reporters. “Mexico is a country open to the world.”

Sheinbaum also called attention to new real estate ventures that have led to rising property values and rents, driving up prices, displacing long-term residents and altering the character of neighborhoods.

“There is already a lot of real estate speculation derived from Airbnb rentals and all these digital platforms,” she said. “We cannot condone the rising cost of the city.”

In 2022, when she was the city’s mayor, Sheinbaum signed an agreement with Airbnb to promote Mexico City as the “capital of creative tourism” — an effort to enhance the city’s reputation as a global hub for remote workers. At the time, Sheinbaum said she did not believe the company would increase prices for locals. But the problem had started years, even decades, earlier.

A study published last year found that from 2000 to 2022, housing affordability in Mexico City worsened as prices quadrupled and Mexicans’ incomes declined — with some gentrified neighborhoods experiencing an eightfold increase in housing prices.

The process has contributed to the emergence of clusters of highly expensive areas and the displacement of more than 23,000 low-income families each year.

“Gentrification has been a constant,” said Tamara Velasquez Leiferman, a Mexican urban studies expert at Rutgers University. “And what we’re seeing right now is the climax.”

Recent administrations have sought to tackle the issue, for example by subsidizing affordable housing and introducing some regulations to Airbnb — although officials have proposed lifting restrictions to ensure the city can welcome the 5 million visitors expected to come for the 2026 FIFA World Cup.

“Mexico City does not agree with gentrification,” the capital’s current mayor, Clara Brugada, said in a statement after the protest. “We reject this phenomenon that excludes people from their neighborhoods and communities.”

Arielle Simone, an American social media influencer, became the focus of ire after celebrating her move from New York City to Mexico City in posts that drew hostile responses. Simone said she had received threats that made it necessary to move to a new neighborhood.

But Simone, who did not respond to a request for comment, courted greater controversy when she started a GoFundMe campaign to raise $4,500 for that move. Some critics said her appeal underscored the disconnect between the living standards enjoyed by some Americans in the city and the challenges that many Mexicans face in making ends meet.