In a dizzying series of events after Bolivia’s contested election, Evo Morales fled the country under pressure from the military and secured political asylum in Mexico.

Morales was Bolivia’s first president of indigenous descent and the longest-serving president in the country’s history. To run for a fourth term in office, Morales needed the Supreme Electoral Court to lift term limits. In addition to the controversial lead-up, the election itself was contested. Morales announced that he had narrowly won the vote, but allegations of election fraud set off weeks of protests. Finally, the military pressured him to resign and Morales left the country on a Mexican plane, along with his vice president and health minister.

When Mexico extended political asylum to the ousted Bolivian leader, some analysts linked the offer to the broader left-wing sympathies that Mexican President Andrés Manuel López Obrador shares with Morales, who nationalized Bolivia’s oil and gas industries to invest in public works projects and reduce extreme poverty, among other initiatives. Yet, attempts to link López Obrador’s extension of asylum to Morales on the basis of similar political leanings ignore Mexico’s long nonpartisan tradition as a haven for political asylum seekers of different political backgrounds.

For decades, Mexico has served as a place of asylum for exiles, and this history has become embedded in the fabric of Mexican politics and identity. While Mexico’s domestic history often involved political repression and hostility to migrants, the country has consistently projected an image of what scholars have called “revolutionary progress” through its high-profile offers of asylum to exiled leaders. Seeking to consolidate this reputation in the decades after the Mexican Revolution in the early 20th century, Mexico framed itself as a welcoming place for progressive ideas and persecuted people, a policy that has continued.

President Lázaro Cárdenas famously invoked this policy and welcomed Spanish Civil War refugees in the 1930s and early 1940s. Despite conservative critics who worried about the employment implications of thousands of new arrivals, Mexican authorities ultimately allowed into the country an astounding 25,000 Spanish people fleeing Francisco Franco’s regime. Fidel Castro and Ernesto “Che” Guevara also met in exile in Mexico in the 1950s — Castro from Cuba and Guevara fleeing Guatemala — where they fatefully launched their partnership.

Perhaps even more remarkable was the influx of exiles fleeing brutal South American military dictatorships in the 1970s and 1980s. Most high-profile were the Chileans who fled to Mexico after the violent overthrow of the democratically elected socialist president, Salvador Allende. Many of the exiles arrived after the dramatic Sept. 11, 1973, coup that witnessed the military bombing of the presidential palace and Allende’s death by suicide. That was quickly followed by a military assault on Allende sympathizers and left-wing activists that included rounding up thousands of people, imprisoning them in the national soccer stadium and torturing and killing many. Those able to escape fled abroad, with thousands going to Mexico.

Chileans described their reception in florid terms. Historian Patrick Kelly writes about this experience, with at least one Chilean exile, Rogelio de la Fuente, remembering that “they [Mexicans] welcomed us as brothers.” Mexico also was the initial place of political asylum for Allende’s family, who had to flee the country. Only six days after the coup, his widow arrived in Mexico City to adoring and welcoming crowds. Mexico broke ties with Chile’s new military dictatorship and became a destination for those fleeing further persecution.

Uruguayans also found safety in Mexico after escaping from their military government, which gained power in 1973. More than 1,000 exiles fled, many of them assisted by a sympathetic Mexican ambassador in Uruguay. The Uruguayan military government recognized the extent of Mexico’s involvement in providing refuge for its citizens and eventually surrounded the embassy with soldiers to attempt to capture political opponents who sought to flee into exile. Exile groups — most famously, the Union for a Democratic Convergence (CDU) — also chose Mexico as its first meeting spot in 1980, which served as its staging ground to challenge the military’s plebiscite later that year.

Argentines followed their regional counterparts to Mexico even before an official military coup in their country in 1976. Starting in 1974, leaders of leftist intellectual groups, political circles and guerrilla organizations fled to Mexico to escape the increasingly repressive rule of Isabel Perón. The Mexican Embassy in Buenos Aires acted as a passageway for former professors, politicians and members of the Montoneros guerrilla group that eventually found a home in Mexico City.

While political divisions among these groups remained, those already in Mexico helped new arrivals obtain legal migrant status and navigate the challenges of their new life abroad. Ricardo Obregón Cano, a former Argentine governor and exile in Mexico in the late 1970s, reported that Mexico was “extraordinarily open and generous with political exiles. … No other country offer[ed] such personal and political security.”

Luis Echeverría’s government provided safe haven for the politically persecuted in the 1970s and 1980s. To many Southern Cone exiles, Echeverría was a hero who offered a welcoming place to relocate and even reorganize and wage battles against the repressive governments in their home countries. Echeverría used the tradition of welcoming the politically persecuted to project an image of liberalism and benevolence in contrast to the dictatorships around the region.

But just because Mexico welcomed the world’s persecuted did not signal a rejection of repressive governance at home. Echeverría was the main architect of the Tlatelolco Massacre in 1968, in which hundreds of civilians were killed by Mexican government forces, and he waged an internal dirty war against perceived subversives during his presidency.

The contradiction could not have been starker to many Mexicans, who saw his welcoming foreign policy as antithetical to his domestic policies, by which Echeverría tightly and at times violently controlled dissent.

Thus, López Obrador’s offer of asylum to Morales is far from an aberration — and is perhaps part of a strategy to distract the public from Mexico’s own treatment of migrants from Central American countries. Morales and others from his cabinet and party are just the latest in a long line of asylum seekers that dates back almost a century.

He is no less grateful than so many of the South Americans who came during the Cold War dictatorships. When he arrived, Morales said, “The president of Mexico has saved my life.” He also tweeted a picture of himself draped in a Mexican flag. After being denied asylum in Argentina, Chile, Peru and Brazil, it must have been a relief for Morales to find a place that would accept him. But as Mexican political commentator Esteban Illades explained, López Obrador was carrying out “a forgotten tradition in this country: No matter your ideology, this country will welcome you if you are persecuted for it.” The image of “revolutionary progress” demanded it — even if few Mexicans or Central American migrants enjoy the same benevolence.