More than a decade of Workers Party rule has seen Brazil prioritize ties with its leftist regional neighbors, from helping muscle socialist Venezuela into the Mercosur trade bloc to financing a billion-dollar transformation of an industrial port in Cuba.

But if President Dilma Rousseff fails to fight off the surging candidacy of reform-minded Marina Silva before presidential voting in October, South America's largest economy could reset its focus.

Silva was thrust into the Socialist Party's presidential nomination when its candidate of choice, Eduardo Campos, died in a plane crash last month. Since then, her anti-establishment profile has propelled her to a neck-and-neck race with Rousseff.

Silva says she would re-emphasize ties to the United States and Europe, mostly by working to land trade deals with each. Such moves could cause tension with Mercosur, which prohibits members from making bilateral deals without the group's approval.

Under Silva, "there will be a change of direction in foreign policy," her top adviser Mauricio Rands told supporters at an event unveiling her proposals. "Brazil should be the promoter of bilateral and regional (trade) agreements."

It would be a sharp change in direction for the proverbial slumbering giant.

Under Rousseff and her two-term predecessor Luiz Inacio Lula da Silva, Brazil has given strong backing to leftist regional allies, such as Cuba, Venezuela, Ecuador and Bolivia.

Rousseff beamed in January as she stood beside Cuban President Raul Castro at a ribbon-cutting ceremony to open the first phase of an overhaul of the Port of Mariel, which the Communist nation expects will become the largest industrial port in the Caribbean.

It was the clout of her government that persuaded Mercosur to set aside fears about possible violation of its democracy rules and welcome Venezuela into membership.

At the same time, Rousseff was not afraid to ruffle Washington's feathers by rejecting an invitation to make a formal state visit to the U.S. capital, the first extended to a Brazilian leader in two decades. Her rebuff of the White House, made in protest of revelations the National Security Agency had spied on her communications, was the first in memory.

Rousseff had been sailing toward an expected victory before Silva's candidacy. Now the two women are expected to claim the first two spots in the Oct. 5 vote, without either one winning an outright majority. That would trigger a run-off vote three weeks later.

Silva has said her foreign policy would aim "to promote national interests and values." A 242-page plan she released declares, "foreign policy cannot be held hostage by factions or political groupings."

Most of her proposed changes would aim to lower tariffs, expand trade and revive Brazil's sputtering economy, which fell into recession this year after years of only feeble expansion.

Critics blame the stagnation on Rousseff's heavy state hand on the economy, replete with trade barriers and an unfriendly business environment. The Mercosur bloc, which also includes Argentina, Paraguay and Uruguay as full members, has yet to sign any significant trade deals and infighting routinely hampers trade even within the group.

Rousseff said earlier this month that Brazil turning its back on Mercosur would be "shooting ourselves in the foot," emphasizing that "we have to realize the size of that market."

While Silva agrees a strong South America is still essential, her plan makes clear she would seek to pivot Brazil toward stronger ties with the broader global market and not be hobbled by its neighbors.

If Silva is elected, "Brazil, as a hemispheric power, will continue to maintain good relations with all the countries in the hemisphere," said Riordan Roett, director of Latin American Studies at Johns Hopkins University. "But it's not going to be the same ideological fervor ... for regimes like Venezuela and Cuba."

Many expect Silva, a renowned environmentalist and human rights champion in the Amazon, to change Brazil's policies of largely ignoring alleged abuses in allies like Venezuela and Cuba. But others argue her hands may be tied by heavy, ongoing investments with those countries.

"The Brazilians have been very reluctant to criticize Venezuela publicly," said Patrick Duddy, a former U.S. ambassador to Venezuela and former consul-general in Sao Paulo. "There are still broad commercial interests there that are not going to disappear if Silva wins."

In a column headlined "Marina scares the neighbors," Clovis Rossi, a foreign affairs columnist for the Folha de S. Paulo newspaper, wrote that Brazil under the Workers Party has been the most powerful defender of Venezuela's former leader Hugo Chavez and current President Nicolas Maduro, backing both amid crises as they pushed ahead with their Bolivarian movement.

"With Marina," Rossi wrote, "everything suggests that Bolivarianism won't be able to count on this powerful crutch."


Associated Press writers Joshua Goodman in Bogota, Colombia, and Brad Brooks in Rio de Janeiro contributed to this report.