Argentina and Brazil, South America's two major powers, were embroiled for almost two centuries in a rivalry that culminated in a race to build an atomic bomb.

The two countries shelved their nuclear ambitions more than a decade ago, but now a economic and diplomatic spat is straining relations anew--and jeopardizing the future of Mercosur, the South American trading bloc in which Brazil and Argentina are the largest members.

Argentina and Brazil joined with smaller Uruguay and Paraguay in 1991 to form Mercosur, now the world's fourth-largest trading bloc. But the Argentines are crying foul over a flood of textiles, shoes and other Brazilian products that became cheaper when Brazil devaluated its currency in January. Since then, the Brazilian real has tumbled 30 percent, while the Argentine peso, tightly pegged to the U.S. dollar, has been stable.

This prompted the Argentines to raise tariffs last month, which angered the Brazilians. At one border crossing, Brazilian farmers formed a roadblock to stop Argentine rice imports. Tensions ran so high that when Argentine President Carlos Menem proposed defusing the issue with a trip to Brasilia, a top aide to Brazilian President Fernando Henrique Cardoso suggested that Menem stay home.

Underlying the rift was Menem's unusual bid--rejected last week--to join NATO. The NATO idea was mostly about Menem's attempt to seal his 10-year legacy before leaving office in December. But Brazilians nevertheless took it as a sign that their neighbor was looking for a strategic--and perhaps military--upper hand in the region.

"It was a very serious matter for Brazilian diplomacy," said Alexandre Barros, a political analyst in Brasilia. "It caught almost everyone here off guard and created a sense of urgency in the Foreign Ministry and the military. Had [Menem's request] not been rejected, the situation would have certainly escalated."

The NATO bid may not have been taken seriously in Washington and Brussels, where the alliance is headquartered, but combined with the trade battle, it reignited some of the long-standing rivalries between these two very different neighbors.

Argentina, one of the most affluent nations in Latin America, is a largely middle-class, Spanish-speaking country of 36 million, populated mostly by European immigrants. Brazil, a continent-size, Portuguese-speaking country of 168 million, has a mixed population--mostly Europeans, Africans and indigenous people. It has a vast underclass, with tiny upper and middle classes.

The Brazilians have long considered the Argentines arrogant in their attitude toward Brazil. They cite Argentine nicknames for Brazilians, such as "the monkeys"--an insult that many Argentines insist is less a slap at Brazil's large African population and more a jab at its lower literacy rate. Either way, Brazilians take offense.

Argentines, meanwhile, accuse Brazilians of trying to strong-arm them into accepting Brazil's role as the regional economic leader because of its size. Brazil has the eighth-largest economy in the world and the largest in Latin America.

Two weeks ago, Menem finally met with Cardoso, whose hard line forced the Argentine to exempt Mercosur nations from the tariff increases. But at a subsequent meeting last week in Uruguay, the two powers stalemated on the overhaul of Mercosur and disbanded with headlines declaring the talks a failure and Mercosur in limbo.

"In these conditions, Mercosur doesn't serve any further purpose," said an outraged Osvaldo Rial, head of the Argentine Industrial Union of Manufacturers.

Analysts hope the feud will be resolved soon. Both nations have a major incentive to keep Mercosur going: It now weighs in just after the NAFTA bloc, the European Union and Japan in trading might. Trade among Mercosur nations exploded from $4.1 billion in 1990 to $20.4 billion in 1998, becoming a vital tool for the budding free market economies in the region.

If Mercosur is to survive, analysts say, Brazil and Argentina must quickly reconcile different monetary policies and other macroeconomic issues. But they are not even expected to resume talks until December, after October's Argentine presidential elections.

Argentina has more to lose if the relationship goes bust, analysts say, because it is so much smaller. Its auto manufacturing industry, for instance, depends on the vast Brazilian market for a huge segment of sales. Perhaps for that reason, the Argentines now appear to be holding out an olive branch.

"I don't think it's wrong for us to admit that another country is bigger, and that our relationship with them is going to be affected by that fact," Jorge Campbell, Argentine Secretary of International Economic Relations said in an interview this week. "And we recognize that Brazil is a bigger nation, and we will respect that. But I think it's to our mutual benefit to find a solution to the problem."