MEXICO CITY — Fernando Bustos Gorozpe was sitting with friends in a cafe here when he realized that — once again — they were outnumbered.

“We’re the only brown people,” said Bustos, a 38-year-old writer and university professor. “We’re the only people speaking Spanish except the waiters.”

Mexico has long been the top foreign travel destination for Americans, its bountiful beaches and picturesque pueblos luring tens of millions of U.S. visitors annually. But in recent years, a growing number of tourists and remote workers — hailing from Brooklyn, N.Y., Silicon Valley and points in between — have flooded the nation’s capital and left a scent of new-wave imperialism.

The influx, which has accelerated since the onset of the COVID-19 pandemic and is likely to continue as inflation rises, is transforming some of the city’s most treasured neighborhoods into expat enclaves.

In leafy, walkable quarters such as Roma, Condesa, Centro and Juarez, rents are soaring as Americans and other foreigners snap up houses and landlords trade long-term renters for travelers willing to pay more on Airbnb. Taquerias, corner stores and fondas — small, family-run lunch spots — are being replaced by Pilates studios, co-working spaces and sleek cafes advertising oat-milk lattes and avocado toast.

And English — well, it’s everywhere: ringing out at supermarkets, natural wine bars and fitness classes in the park.

At Lardo, a Mediterranean restaurant where, on any given night, three-quarters of the tables are filled with foreigners, a Mexican man in a well-cut suit recently took a seat at the bar, gazed at the English-language menu before him and sighed as he handed it back: “A menu in Spanish, please.”

Some chilangos, as locals are known, are fed up.

Recently, expletive-laced posters appeared around town.

“New to the city? Working remotely?” they read in English. “You’re a f—ing plague and the locals f—ing hate you. Leave.”

That sentiment echoed the hundreds of responses that poured in after a young American posted this seemingly innocuous tweet: “Do yourself a favor and remote work in Mexico City — it is truly magical.”

“Please don’t,” read one of the kinder replies. “This city is becoming more and more expensive every day in part because of people like you, and you don’t even realize or care about it.”

Hugo Van der Merwe, 31 — a video game designer who grew up in Florida and Namibia and has spent the last several months working remotely from Mexico City, Montreal and Bogota, Colombia — said he understands why locals are vexed by the growing population of “digital nomads.”

“There’s a distinction between people who want to learn about the place they are in and those who just like it because it’s cheap,” he said. “I’ve met a number of people who don’t really care that they’re in Mexico, they just care that it’s cheap.”

Clear financial incentives are drawing Americans to Mexico City — where the average local salary is $450 a month.

For the cost of a $2,000 one-bedroom in Koreatown, an Angeleno can rent a penthouse here.

Despite growing tensions, Mexico City is not Paris, where an American stumbling over French in a boulangerie will get a dose of hostility along with her croissants. It’s not Berlin or Barcelona, where locals in recent years have mounted major protests over excessive tourism and the gobbling up of urban properties by global investment firms.

The vast majority of people in this crowded, colorful metropolis are unwaveringly kind and patient with international visitors, who in the first four months of this year spent $851 million on hotels alone, according to tourism records.

But there is friction beneath the surface, as more locals consider what gentrification means for the city’s economics, culture and even race relations.

Over the weekend, a tenant advocacy group hosted a walking tour of “places we have lost to gentrification, touristification and forced displacement.”

“Our homes,” the event flier read, “now house digital nomads.”

The dynamic playing out here is, in many ways, an old-world problem colliding with tech-age mobility, one that is forcing Mexico to confront its own history and traits.

After his revelation at the cafe, Bustos uploaded a video to his popular TikTok account, complaining that the influx of foreigners in Mexico City “stinks of modern colonialism.” Nearly 2,000 people posted comments in agreement.

His critique is multilayered and speaks to generations of injustices. There’s the problem of newcomers’ “indifference as to how their actions are affecting locals,” he said, but also the fact that Mexicans cannot migrate to the U.S. with the same ease. He also believes that Americans, many of whom are white, are reinforcing the city’s pervasive — if infrequently discussed — caste system.

Indigenous Mexicans are more likely to be poor than lighter-skinned Mexicans and are largely unrepresented in film, televi- sion and advertisements. A growing social movement called Poder Prieto (“Brown Power”) has demanded that Netflix, HBO and other streaming platforms feature dark-skinned actors.

“Mexico is classist and racist,” Bustos said. “People with white skin are given preference. Now, if a local wants to go to a restaurant or a club, they don’t just have to compete with rich, white Mexicans but with foreigners too.”

Greater Mexico City’s 3,000 square miles are ringed by mountains and home to 21 million people. Most Americans stick to a few neighborhoods in the center, some of which were first gentrified by Mexicans.

After the 1985 earthquake devastated neighborhoods in and around downtown, middle-class residents fled by the hundreds of thousands to areas on the city’s periphery that they deemed safer.

In Roma and Condesa, artists lured by cheap rents moved in, turning the area into a creative and intellectual hub.

The flood of American visitors began in earnest around 2016, when the New York Times named Mexico City the world’s top travel destination, and magazine writers wondered whether it was the “new Berlin.”

International artists, chefs and designers arrived, scooping up inexpensive studio spaces, opening restaurants and integrating themselves into the city’s imaginative nightlife.

The pandemic pushed it into overdrive. As much of Europe and Asia shut their doors to Americans in 2020, Mexico, which adopted few COVID-19 restrictions, was one of the few places where gringos were welcome.

Making it easier: Americans have long been able to stay here up to six months without a visa.

The State Department says there are 1.6 million U.S. citizens living in Mexico, although it doesn’t know how many are based in the capital. Mexican census data track only foreigners who have applied for residency, and most remote workers don’t.

But the anecdotal evidence is compelling. In the first four months of the year, 1.2 million foreigners arrived at Mexico City’s airport. Alexandra Demou, who runs the relocation company Welcome Home Mexico, said she gets 50 calls a week from people contemplating a move.

“We’re just seeing Americans flooding in,” she said. “It’s people who maybe have their own business, or maybe they’re thinking of starting some consulting or freelance work. They don’t even know how long they’re going to stay. They’re completely picking up their entire lives and just moving down here.”

There is plenty to love about Mexico City.

Wide, tree-lined boulevards call to mind the capitals of Europe and each Sunday are closed to cars and filled with bicyclists. A hodgepodge of architecture — Art Nouveau, Art Deco, Modernist — stitch together in artful ways.

And the food is superb: Street vendors sell spit-grilled al pastor pork tacos, delicate quesadillas stuffed with squash blossoms and stewed corn topped with mayonnaise and lime — sometimes all on the same block.

Sarah Lupton, a 35-year-old from North Carolina who came to Mexico City last year, as soon as she got her second COVID-19 vaccine, said she fell in love with the “romantic yet gritty” aesthetic. She ended up selling her video production company and relocating here in January with her Shih Tzu. Now she’s learning Spanish, applying for residency and exploring a new path as a life and career coach.

“I came for a new set of possibilities for how I experience my life and what I get to create in it,” she said. “I feel like this city has everything I need to build a life of creativity, connection, adventure and stability.”

Lauren Rodwell, 40, also moved down in January after spending several months here last year.

A marketer who works a tech job that is remote, she was tired of living in San Francisco, where every conversation began with, “What do you do?”

“I like being in vibrant cities that have multiple cultures that mix well, where there’s good food and good energy and dancing and art,” she said. “It reminds me of being in a more friendly, more clean at times, Brooklyn.”

Lupton and Rodwell both said they are sensitive to concerns about gentrification. In San Francisco, Rodwell lived in the Mission, a neighborhood that became emblematic of the sweeping change wrought by the tech industry there.

“I try and frequent local businesses and not go with the big conglomerates,” said Rodwell. “I try to give money back to my community and be involved in my community.”

Rodwell, who is Black, said she doesn’t feel guilty.

“I kind of feel like, as a person of color from America, I’m so economically disadvantaged that wherever I go and experience some advantage or equity, I take it,” she said.

In Mexico, which has a relatively small population of Afro-Mexicans and had a shorter history of slavery, Rodwell does not experience the same racism as she does in the U.S., she said. “Being Black in America,” she said, is exhausting. “It’s nice to take a break from it.”

Much of the criticism in the growing debate about foreigners comes down to economic inequality.

“Americans can come here, and they can afford everything and live like kings and queens,” said Dan Defossey, an American who moved to Mexico a dozen years ago and owns a popular barbecue joint. But they need to understand, he said, that “Mexico is not cheap for Mexicans.”

Omar Euroza, a barista at a coffee shop in Roma, said rent for his apartment in the city’s historic center, another place where foreigners are flocking, has more than doubled over the last five years. Nearby, renters have been pushed out as entire buildings are turned into upscale apartments.

A recent study showed that Mexico City residents spend an average of 60% of their income on housing, and nearly a third of residents moved during the pandemic, the majority because they couldn’t afford rent.

Euroza said he was sick of feeling like an outsider in his city. Around 60%-70% of his clients are foreigners, he said.

“Some people order in English and get mad when I don’t understand them.”

A chef who had just taken a sheet of warm cookies out of the oven shook his head.

“That’s unfair,” he said. “If we go to the U.S., we’re expected to speak English.”

There is a growing movement to help newcomers understand the impact they’re having — such as a poster campaign that, during the peak of the pandemic, coaxed foreigners to mask up. “Dear guests, we are genuinely happy you’re vaccinated,” the posters read. “Please consider that many of us are not.”

Some Mexicans aren’t unhappy about the American inundation, like Sandra Hernández, a real estate agent who said all of the recent deals she has closed have involved Americans. They mostly want houses or apartments in the Art Deco style, she said, and are all willing to pay the asking price.

Ted Rossano Jr., whose parents two decades ago opened a taco stand in Centro, said income from foreigners has helped save the business, which suffered during the pandemic. Ricos Tacos Toluca is a stop on several of the “taco tours” that have emerged in recent years, and he said foreigners now supply about 15% of the stand’s revenue.

“It’s cool. We’re proud of it,” Rossano said. “Who would have thought that a simple business like this would get international recognition?”

On a recent afternoon, three Americans and a Brit were contentedly munching the stand’s famous green chorizo tacos as their guide, Tyler Hansbrough, explained the chef’s handiwork.

“See, she has to render all that,” he said, as Rossano’s mom moved chorizo around a griddle.

Hansbrough taught Spanish at a San Francisco high school before moving here in 2016. He married a Mexican man and opened Tyler’s Taco Tours to show visitors authentic Mexican food — not the upscale stuff they might find in restaurants in Roma or Condesa.

He has been struck by the number of remote workers flooding in and worries that they are different. The nature of their jobs means they don’t necessarily have to learn Spanish or integrate into Mexican society, he said. It allows a certain aloofness that wasn’t possible a few years ago.

“So many people come here and think, ‘Oh, Mexico City is so cheap. I could move here.’ And they are. They’re renting my Airbnb for months at a time,” he said. “But I’m starting to be worried. It’s great for business, but it’s also kind of scaring me.”

As his group finished the tacos and ventured into the cacophonous city for their next meal, another taco tour sidled up to Rossano’s stand.