AMONG the messages of congratulation for Andrés Manuel López Obrador on his landslide victory in Mexico’s presidential election, one stood out. Nicolás Maduro, Venezuela’s semi-Stalinist dictator, declared with more enthusiasm than coherence that it would “open the broad avenues of sovereignty and friendship between our peoples”. Whatever else the triumph of AMLO (as Mexicans call Mr López Obrador) may portend, it has provided a fillip for the Latin American left, of all varieties, after it has suffered a series of defeats. It may shift the region’s diplomatic balance and offer encouragement to Mr Maduro’s regime. And it will have an important bearing on Latin American economic integration.

Even more than his domestic plans, AMLO’s future foreign policy remains vague. He has a profound attachment to his country and a similarly profound indifference to anywhere else. “The best foreign policy is domestic policy,” he said during the campaign, arguing that a stronger Mexico would be more respected in the world. Other Mexican presidents-elect have used the absurdly long five-month transition before taking office to go on foreign tours. After he has refined his policy proposals, AMLO plans a victory lap around his own country.

In office, his priorities may change. At the behest of pragmatic advisers, over the past year he made trips to the United States, Europe and South America. Perforce, his handling of President Donald Trump and the renegotiation of the North American Free-Trade Agreement will have a big impact on his presidency. Interdependence with the United States is a fact of life for Mexico, which sends 80% of its exports across its northern border.

It is on Latin America that Mexican foreign policy may change most. Whatever its faults, the outgoing government of President Enrique Peña Nieto has played a leading role in two regional initiatives. One is the Lima group, an ad hoc gathering of 14 countries trying to restore democracy in Venezuela. The other is the Pacific Alliance, comprising Mexico, Chile, Colombia and Peru, which espouses free trade and liberal economic policies.

The stance Mr López Obrador takes on these initiatives will depend in part on which of two advisers he picks as foreign minister. Marcelo Ebrard, his successor as mayor of Mexico City, is a modern-minded social democrat. Héctor Vasconcelos, a long-standing supporter of AMLO, was briefly ambassador to Denmark. He has said that Venezuela’s problems are a “strictly internal” matter and that he would not have signed the Lima group’s call for the re-establishment of democracy. He espouses the principles of non-intervention and unrestricted respect for sovereignty that Mexico adopted during the cold war. “It’s back to a 1960s and 1970s way of looking at things,” says Andrés Rozental, a former diplomat. “They might not pull out [of the Lima group] but their position would be different.”

On trade, Mr López Obrador has an opportunity. With Mr Trump bent on protectionism and with the European Union immersed in internal problems, Latin America’s best hopes of expanding its exports lie in Asia and, above all, in South America. By facilitating scale and specialisation, deeper regional integration would not just boost trade but would make Latin American companies more competitive in global markets.

Yet Latin America’s web of 33 subregional preferential trade agreements, each with different rules, is giving diminishing returns. Intra-regional trade peaked in the early 2000s and Latin American exports have lost global market share since 2012. A new study by the Inter-American Development Bank (IDB) argues for moving to a Latin America-wide free-trade agreement. Nearly 80% of regional trade is already duty-free. According to Antoni Estevadeordal of the IDB, “the big missing link” involves Mexico and the Mercosur group (based on Argentina and Brazil). The Pacific Alliance and Mercosur are holding informal technical discussions about how to harmonise their rules. Mexico and Brazil are negotiating to deepen their bilateral trade accord.

Will AMLO support these talks? The signals are contradictory. On the one hand, he has made protectionist noises, such as saying that Mexico should produce the food it consumes. On the other, he says he wants a stronger economy, trade diversification and closer engagement with the rest of Latin America. “I think he will understand eventually that [trade agreements] don’t contradict any of his fundamental positions,” says Mr Rozental. Sadly for Latin America, that open-mindedness may not extend to the collective defence of democracy in Venezuela.