In the past century, Mexico has opened its doors to revolutionaries, Spanish exiles, and persecuted Latin American leaders -- a tradition that has been dealt an unprecedented blow by a police invasion of its embassy in Ecuador.
Quito has faced a barrage of criticism over its shock raid on Mexico's embassy in the capital to seize graft-accused former Ecuadoran vice president Jorge Glas, who just hours early had been granted political asylum.
Considered the sovereign territory of the nation they represent, embassies are supposed to be inviolable and a police raid of this nature is almost unheard of.
"Not even in the worst coups d'etat in our region has a situation of this nature occurred," Mexican Foreign Minister Alicia Barcena told a local broadcaster.
She defended the granting of asylum to Glas as part of a regional treaty dating back to 1954 which enshrines the right of states to "admit into their territory the people they deem appropriate."
"We consider this right to asylum to be sacred," said President Andres Manuel Lopez Obrador, just hours before granting it to Glas.
The invasion prompted the leftist leader to break off diplomatic ties with Ecuador, something Mexico had only done previously with Spanish dictator Francisco Franco, Chilean strongman Augusto Pinochet, and Nicaraguan dictator Anastasio Somoza.
The list of people to whom Mexico has given asylum is far longer.
Russian revolutionary Leon Trotsky, who was expelled from the Soviet Union by Joseph Stalin in 1929, also sought refuge in Mexico -- which did not spare him from assassination in 1940.
Spain's republican government in exile also settled in Mexico after a civil war resulted in Franco's victory in 1939, as well as more than 20,000 Spaniards, including intellectuals, artists and writers.
In 1955, brothers Fidel and Raul Castro sought exile in Mexico, which they used as a base to plan their revolution to overthrow the Cuban government.
There they connected with other revolutionary figures seeking refuge in Mexico, such as Ernesto "Che" Guevara.
A raft of coups and military dictatorships in the 1970s also spurred multiple asylum requests.
In more recent times, Bolivia's former president Evo Morales fled to Mexico in 2019 amid a political crisis.
After his disastrous attempt to dissolve Congress and rule by decree, Peru's former leader Pedro Castillo asked for refuge in the Mexican embassy in Lima in December 2022, but was arrested before getting there.
Lopez Obrador said that most people persecuted and taken in by Mexico had been accused of something.
"Weren't those fleeing the Spanish Civil War accused of being communists? Trotsky was a traitor to Stalin, supposedly, to the Russian Revolution, and he was given protection and refuge?"
Mexico has said it will file a complaint about the Ecuadoran raid with the International Court of Justice, alleging an "irreparable violation" of the Vienna Convention, which establishes that embassy premises are "inviolable."
The only similar event in the region was recorded in June 1976, when Uruguayan teacher and anarchist militant Elena Quinteros jumped over the wall of the Venezuelan embassy in Montevideo while escaping from the police.
Although diplomatic personnel tried to protect her, she was forcibly removed and taken to a detention center where she was allegedly tortured. Her remains were never found.
Other police interventions have been staged to recover diplomatic territory invaded by armed groups or protesters.
In April 1997, Peru's military raided the residence of the Japanese ambassador, which had been occupied for four months by the Marxist guerrilla Tupac Amaru Revolutionary Movement, who were holding about 70 people hostage.
All of the militants were killed.
In 1980, a group of protesting peasants and students entered the Spanish embassy in Guatemala. An intervention by security forces led to a fire which killed 37 people.