LIKE voters in most democracies, Brazilians pay little heed to foreign policy when choosing leaders. Yet the presidential election on October 26th matters not just to Brazil but to the region. Over the past two decades Latin America’s giant has overcome its introversion and wielded growing influence in its backyard. And on foreign policy, as on economics, there is a clear gap between President Dilma Rousseff of the centre-left Workers’ Party (PT), who wants a second term, and her rival, Aécio Neves, of the centre-right Party of Brazilian Social Democracy (PSDB).

Brazil’s greater assertiveness began under Fernando Henrique Cardoso of the PSDB in the 1990s and continued under the PT’s Luiz Inácio Lula da Silva, the president in 2003-10. Both gave importance to the Mercosur trade block (founded by Brazil, Argentina, Paraguay and Uruguay), to South America and to ties with Africa and Asia. Both had reservations about a 34-country Free-Trade Area of the Americas, a plan that Lula helped to kill.

But there were differences, too, partly because of Brazil’s changing circumstances. Lula put far more stress on “south-south” ties and on the BRICs grouping (linking Brazil to Russia, India, China and later South Africa). In Latin America he emphasised “political co-operation”. Relations with the United States were cordial but distant, especially after Lula tried brokering a nuclear deal with Iran which the White House opposed.

While distancing herself from Iran, Ms Rousseff has otherwise followed Lula’s script. She welcomed Hugo Chávez’s Venezuela into Mercosur, which now, critics say, is more about solidarity among leftist governments than about trade. The failure of that vision of South American integration was highlighted by the formation of the rival Pacific Alliance linking free-trading Chile, Peru, Colombia and Mexico.

Ms Rousseff’s main foreign-policy achievement was to host a successful summit on internet governance. Her effort to mend fences with the United States was blown off course by revelations from Edward Snowden, a renegade American contractor, that her phone had been tapped.

Generally she has little interest in foreign policy. She has made fewer than half as many foreign trips as Lula did in his first term, and received a similarly reduced number of foreign leaders, notes Carlos Eduardo Lins da Silva, the editor of Política Externa, a journal. Diplomats say she has little time for Brazil’s respected, but now demoralised, foreign ministry. In a second term she would aim to reschedule a visit to Washington, DC, cancelled over the Snowden affair. And Marco Aurélio Garcia, foreign-policy adviser to both Lula and Ms Rousseff and architect of their South American policy, is likely to retire.

Mr Neves wants bigger changes. On trade, he would try to overcome what Rubens Barbosa, an adviser, calls Brazil’s isolation from global value chains. He would aim to scrap Mercosur’s provision requiring the whole block to agree to any negotiations with third countries. If ultra-protectionist Argentina and Venezuela objected, he would consider ditching the pretence that Mercosur is a customs union. The idea would be to speed up tortoise-like talks on a trade deal with the European Union, and enable closer ties with the Pacific Alliance.

Another change if Mr Neves won would be in the sense of the “independent” foreign policy that Brazil has proclaimed in recent decades. Under Lula and Ms Rousseff, this often seemed to mean “anti-American”. Ms Rousseff criticised the American-led action against Islamic State, but not Russia’s takeover of Crimea. Mr Neves would seek closer ties with developed countries (a main source of technology and markets for Brazil’s manufactures) without abandoning Asia or Africa. In South America, he’d “de-ideologise” policy, rather than team up with Venezuela, Argentina and Cuba.

Brazil will not (and should not) be a poodle of the United States. Some of Mr Neves’s changes are nuances. But they are important enough to prompt nail-biting in Caracas, Buenos Aires and Mexico City, as well as in Brasília, over a close contest.