It started with just a few American retirees. These days, two dozen players fill the courts at the municipal sports centre most mornings, swinging paddles at plastic balls. There are so many clubs in Mexico dedicated to the US sport that a tournament was held here last year.
"It was a madhouse," said Victor Guzmán, a 67-year-old entrepreneur from Charlotte who helped pull the event together.
Mexico's statistics institute estimated this month that the US-born population in this country has reached 799,000 – a roughly fourfold increase since 1990. And that is probably an undercount. The US Embassy in Mexico City estimates the real number at 1.5 million or more.
They are a mixed group. They are digital natives who can work just as easily from Puerto Vallarta as Palo Alto. They are US-born kids – nearly 600,000 of them – who have returned with their Mexican-born parents. And they are retirees like Mr Guzmán, who settled in this city five years ago and is now basically the pickleball king of San Miguel.
If the thousands of Mexicans moving home are taken into account, the flow of migrants from the United States to Mexico is probably larger than the flow of Mexicans to the United States.
The American immigrants are pouring money into local economies, renovating historic homes and changing the dynamics of Mexican classrooms.
"It's beginning to become a very important cultural phenomenon," Marcelo Ebrard, Mexico's foreign minister, said in an interview. "Like the Mexican community in the United States."
And yet, he said, Mexican authorities know little about the size or needs of their largest immigrant group. He has been tasked by President Andrés Manuel López Obrador with changing that.
While the United States is deeply divided over immigration, American immigrants here have largely been welcomed. In San Miguel – where about 10 per cent of the city's 100,000 residents are US citizens – Mayor Luis Alberto Villareal delivers his annual State of the Municipality address in English and Spanish.
Thanksgiving is celebrated a few weeks after Mexico's Day of the Dead. Restaurants have adopted "American timing" – serving dinner at the ungodly hour of 6pm – the mayor reports.
"Despite the fact that Donald Trump insults my country every day, here we receive the entire international community, beginning with Americans, with open arms and hearts," Mr Villareal said.
Mexican authorities say that many of the Americans are probably undocumented – typically, they have overstayed their six-month visas. But the government has shown little concern.
"We have never pressured them to have their documents in order," Mr Ebrard said.
Typically, violators pay a small fine.
Mr Villereal shrugged.
"We like people who come to work and help the economy of the city – like Mexicans do in the United States."
San Miguel de Allende is about 170 miles northwest of Mexico City on a mile-high plateau where the sunshine coaxes bougainvillea to erupt in blazing colours and spill over walls. US veterans began moving here after World War II to study at the local art institute on the GI Bill. Over the past 30 years, expatriates flooded in, enchanted by the city's hilly cobblestone streets, soaring Gothic church, and houses painted in sunset colours: dusky rose, peach, yellow, orange.
The scenery is not the only draw. Given the dollar's strength against the Mexican peso, even an American getting by on Social Security and a modest pension can rent a high-ceilinged apartment, hire a maid and eat out most nights.
"You can live here on $2,000 or $3,000 a month – and live well," Mr Guzmán said.
Technology has shrunk the distance between the countries. In the 1980s, expat author Tony Cohan would contact his daughter in New York by trekking to the "larga distancia" office, where an operator would put a call through, as he recounted in his popular memoir On Mexican Time.
These days, Bill Slusser, 66, from Los Angeles, does part-time marketing work for American clients without leaving his home here: "The internet allows that to happen."
"For the things you can't find," Mr Slusser said, "you just buy them off Amazon."
So many Americans live here that it is not necessary to speak Spanish. There is a dazzling array of activities for English-speakers: the Rotary Club, the quilters' circle, dancing clubs, Alcoholics Anonymous. Expats run dozens of charitable groups, mentoring Mexican students, helping provide clean drinking water, serving meals to poor abuelitas.
"Because it's a relatively small town, it's very easy to meet people and do whatever you want to do," Mr Slusser said one recent Friday at a tiny cafe. It was karaoke night.
"Por favor, tortilla chips!" a New York lawyer yelled.
The US population in Mexico is still much smaller than the Mexican immigrant population north of the border, which is estimated at around 11 million. But quietly, Americans are putting their imprint on Mexican towns.
About 35,000 Americans live in the beach resort of Puerto Vallarta (the destination for the Love Boat in the old television series). About 20,000 Americans reside near Lake Chapala, in central Mexico, according to the US Embassy.
Americans are renovating homes in the historic centre of Merida, the Yucatecan capital. They are savouring Pacific Ocean views from homes on Gringo Hill in Sayulita. There are so many Americans in Mexico City's trendy Condesa neighbourhood that the guitarists who stroll outside the cafes ask for tips in English.
For all the images of worn-down Central Americans crossing Mexico in caravans, the vast majority of immigrants to this country – around 75 per cent – are from the United States.
Driving around San Miguel, you can see the foreigners' influence: million-dollar homes with chefs' kitchens and sunken tubs not far from local dwellings of battered, unpainted brick.
But there seems to be little resentment of the Americans.
On the annual Day of the Construction Worker this month, about 20 labourers crowded around folding tables set up on the patio of a half-finished house in a gated community in San Miguel. Following Mexican tradition, the owners of the house treated them to a party, complete with a lunch of pork, chicken tinga, beans, tortillas and beer, and a Norteno band.
"Eighty per cent of our clients are foreign," said Luis Camarena, a Mexican architect working on the house. "Of that 80 per cent, 90 per cent are American.
"For them" – Camerena gestured at the labourers – "it means work."
Mr Trump is not wrong about the rising numbers of migrants reaching the southern US border. But they are more likely to be Central American than Mexican.
Since 2015, census data shows, more Mexicans have returned home each year than moved to the United States. Data from 2017, the most recent year for which numbers are available, showed a net decrease of 300,000 Mexican immigrants in the United States.
Some of the Mexicans heading south were deported or felt increasingly unwelcome in the United States. Others were drawn back home by improved opportunities. Mexico's population growth has slowed as education levels have risen, reducing the local competition for jobs.
Many of the returning Mexicans brought little Americans with them.
They are children like 3-year-old Sedona Barron and her 6-year-old brother, Adero. The siblings came to San Miguel two years ago after their father, Jesús, was deported. He, too, was a stranger to this country; he had moved to the United States with his family illegally when he was just 5. He had married an American, but a drunken-driving conviction kept him from legalising his status.
The move from Arizona was especially hard for Adero.
"He started kindergarten in Mexico with no Spanish," said his mother, Katerina. "He was just terrified of speaking Spanish. He felt very lost at the beginning."
She, too, barely spoke the language.
In some towns that have traditionally sent migrants to the United States, the American-born children of returnees now make up 10 per cent or 15 per cent of the student body, according to Andrew Selee, head of the Migration Policy Institute in Washington.
"It's like East LA," he said.
In the past, when waves of Mexicans returned from the United States, they were typically men, like the guest workers known as "braceros" who were employed on American farms from the 1940s to the 1960s.
Now many of those returning are families.
"One of the biggest challenges is that Mexican schools are not ready to receive kids who began their education in the US in English," said Silvia Giorguli, a demographer and president of the College of Mexico in the capital.
Unlike the United States, Mexico has not traditionally had many immigrants. Less than 1 per cent of the population is foreign-born. After a decades-long wave of Mexican migration transformed the United States, she said, it is now Mexico that faces a dilemma.
"How do you integrate Americans?"
The Washington Post