PRICKLY nationalism is trending in the rich world, but in South America’s two biggest countries the talk is of partnering up. On February 7th Mauricio Macri, Argentina’s president (shown on the left), plans to visit his Brazilian counterpart, Michel Temer. They will promise to encourage trade and to improve a relationship that is frostier than it should be. There are grounds for hope, but also for scepticism.

For most of the 20th century Brazil and Argentina were more rivals than partners. In the 1970s they nearly embarked on a nuclear arms race; until the mid-1980s Brazil’s military-strategy textbooks taught that the likeliest war was with its southern neighbour. Brazil’s population and economy dwarf those of Argentina, though Argentines are richer (see chart). That makes it hard to reproduce anything like the Franco-German collaboration that drew Europe together. When Brazil and Argentina agree, it is usually on nationalist ideology rather than on openness. That was the case in the 1950s under the autocrats Getúlio Vargas in Brazil and Juan Perón in Argentina; and during the 2000s, when both countries adopted variants of left-wing populism.

Next week’s summiteers do not look at first glance like the sort to break the pattern of suspicion. Mr Macri was born into a family that made its fortune in Argentina’s protected construction and car industries, though he espouses economic liberalism. Mr Temer’s Party of the Brazilian Democratic Movement is friendly to business, which has traditionally resisted free trade. But both leaders have strong reasons to advocate openness. They inherited economies in trouble. GDP shrank in both countries last year (by 3.3% in Brazil and by 1.8% in Argentina). The recession in Brazil, which buys a sixth of Argentina’s exports, makes Argentina’s worse: a 1% drop in Brazil’s growth is thought to reduce growth in Argentina by 0.7% after two years. To get out of their slumps, the presidents are undoing the mistakes of left-wing predecessors. After taking office in December 2015, Mr Macri eased currency controls, ended the publication of fake economic data and reached a deal with creditors to restore Argentina’s access to capital markets, which it lost after a default in 2001. Mr Temer, who became president after his predecessor, Dilma Rousseff, was impeached last August, pushed through a 20-year freeze on government spending to shrink a massive budget deficit. Congress, due to return from recess on February 2nd, is to consider his proposal to reform the unaffordable pension system. Stockmarkets in Buenos Aires and São Paulo have rallied since the two leaders took office.

This consensus on pro-market pragmatism is “unprecedented”, says Paulo Estivallet de Mesquita, who is in charge of Latin American affairs at Brazil’s foreign ministry. Francisco Cabrera, Argentina’s industry minister, agrees. “We are finally on the same wavelength,” he says. Both presidents, the officials say, want deeper co-operation on everything from nuclear energy to fighting organised crime. Most of all, they want to revive Mercosur, a moribund regional trade block.

Mercosur began promisingly in 1991, with Paraguay and Uruguay as the two other founding members. By 1998 trade among the four countries doubled as a share of the total to around 20%. Mercosur became a customs union, with a common tariff policy, in 1994. But trade within the group remains hampered by exceptions and non-tariff barriers. A series of crises, including a Brazilian devaluation in 1999 and Argentina’s default, made governments reluctant to remove them. Left-wing governments came to power, turning Mercosur into a “rhetorical project”, says Rubens Barbosa, a Brazilian ex-diplomat. That became even truer in 2012, when the group admitted Hugo Chávez’s Venezuela. Trade within Mercosur has shrunk in relative terms, to 13% of the total.

Mr Temer and Mr Macri want to remove barriers within the group and to strike trade deals beyond it. In December Mercosur suspended Venezuela for violating human-rights and trade standards, another sign of the two leaders’ like-mindedness. That may help the group work better. Donald Trump’s protectionism may offer an opportunity for deals with outsiders. Japan, a signatory of the Trans-Pacific Partnership, from which the United States has now withdrawn, says it is interested in a deal with Mercosur. The European Union has hinted that it would like to conclude a long-delayed agreement this year.

But the prospects for such pairings are worse than they look. Europe is an especially skittish partner. In October a trade deal between the EU and Canada nearly fell apart after seven years of talks.

Agreement within Mercosur may also be elusive. Recession makes Argentina’s manufacturers more wary of heightened competition from Brazilian business. Brazilian firms are almost as nervous. Mercosur has made industries in both countries less competitive by shielding them from the rest of the world with high tariffs, says Lucas Ferraz, an economist at FGV, a university in São Paulo.

Mr Macri is unlikely to make offers on trade before mid-term elections in October, which he hopes will boost his coalition’s position in congress. The political calendar in Argentina is “inopportune”, admits a Brazilian diplomat. After the elections, he thinks, progress could speed up.

Even with the best intentions, Mr Temer and Mr Macri cannot overcome the awkwardness created by their size gap. Argentina will be forever wary of its giant neighbour; Brazil will never treat it as an equal. However gracefully the two presidents dance, they are likely to tread on each other’s toes.