Uruguay saw an opportunity in China. I have learned to trade risks.

Word that Uruguay was seeking a trade deal with China sparked jubilation on the Elamo ranch, a lush expanse of grass dotted with cacti and herds of cattle on Uruguay’s eastern plains.

Most of the cattle is destined for buyers in China, where they face a 12 percent tariff — more than double the rate applied to meat from Australia, the largest beef exporter to China. New Zealand ranchers, the second largest exporter, have duty-free access to China.

“Bring in the trade agreement,” said Jasja Kotterman, who runs the family-owned farm. “That would level the playing field for us.”

But the enthusiasm in the South American country has recently given way to resignation that a trade deal with China is unlikely to happen anytime soon. What has become a new opportunity for Uruguay has turned into a cautionary tale of the perils of trade policy for small nations grappling with complex geopolitical realignments.

Uruguay’s president, Luis Lacalle Poe, has staked his economic legacy on achieving a trade deal with China. “We have every intention of delivering it,” he said last July, when he announced the start of formal negotiations. China has been open to talking about a bilateral agreement with Uruguay.

But Uruguay’s aspirations have sparked anger and recriminations in neighboring Brazil and Argentina, as well as what has been seen as economic retaliation. Along with Uruguay and Paraguay, they belong to Mercosur, an alliance formed more than three decades ago to promote regional trade.

Brazil has in recent months relegated Uruguay to the sidelines as it seeks a broader trade deal with China on behalf of the bloc.

The President of Brazil, Luiz Inacio Lula da Silva, said during a conference January visit to Uruguay The capital, Montevideo.

In April, Mr. Lula traveled to China, where he received red carpet treatment, including a visit with the country’s supreme leader, Xi Jinping.

“No one will stop Brazil from improving its relationship with China,” said Mr. Lula.

Whatever the Chinese government’s interest in striking a deal with Uruguay, it quickly succumbed to its focus on Brazil, a calculation based on basic arithmetic: Uruguay is a country of 3.4 million people, while Brazil is the largest economy in South America with a population of 214 million. .

However, despite the Brazilian president’s stated interest in brokering a trade deal, the prospects for a deal between Mercosur and China seemed somewhere between minimal and non-existent.

A slow-moving organization riddled with internal discord, Mercosur has spent more than 20 years trying to complete negotiations for a trade deal with the European Union. And one of its members, Paraguay, has nothing to do with Beijing and instead maintains relations with Taiwan. That alone made the prospect of a deal between Mercosur and China unimaginable.

All of which increased the possibility that Uruguay would end up hurting its dealings with its neighbors with no economic gain.

“Uruguay is being used as leverage for China to negotiate with Brazil,” said Ms. Kotterman, the supervisor of the El Álamo ranch, as the full moon cast a silver glint on the lawn.

Uruguay’s arrival in a trade deal with China was more than just the final destination for its cows. Her government was seeking to redraw the terms of engagement with the rest of the world, while separating the country from the legacy of trade protectionism that had prevailed in South America’s largest economies.

It openly viewed China as a counterweight to US hegemony in the hemisphere.

Labor unions have dismissed the prospect of a deal as a threat to higher-paying factory jobs, while politicians — some within the ruling coalition — have condemned the president’s alignment with China as a national security risk.

But the biggest concern centered on the consequences of a potential rupture within Mercosur, which formed in 1991.

Mercosur acts as a tariff group with the rest of the world. In pursuit of its own accord with China, Uruguay has been violating the group’s solidarity. It will open its markets to Chinese factory goods in return for lowering tariffs on beef exported to China. The additional sales to farms in Uruguay will come at the expense of beef producers in Brazil and Argentina.

Mercosur is widely seen as falling far short of its goals of stimulating a single market in South America. Its supposed designs on promoting trade were often hindered by the interests of the politically powerful industries in Brazil and Argentina. The two countries have succeeded in obtaining dozens of exemptions that prevented their companies from competing with others in the bloc.

However, many regional leaders place the importance of cooperation as the key to achieving prosperity and freeing the continent from its heavy reliance on mining for raw materials and the cultivation of commodity crops such as soybeans.

Mercosur champions say the alliance is the only way for its members to build common energy markets, international highways and other infrastructure needed to advance industrialization.

Mercosur has also presented itself as an alternative to dependence on the United States.

“Mercosur is important, and it should be even more important,” said Martin Guzmán, a former Argentine economy minister. “I don’t see a way out of the problem of stagnation on the continent if it is not through deeper integration.”

He criticized Uruguay’s pursuit of a trade deal with China as a threat to the bloc.

“If everyone behaves this way,” he said, “there is a long-term cost.”

Exporters in Uruguay preferred to focus on the potential benefits — the biggest crack in selling in China, a country of 1.4 billion people.

Facundo Marquez has focused on the potential for additional sales for his company, Polanco Caviar, which raises sturgeon in cages in the Negro River in central Uruguay. Rising incomes in China have led to a growing appetite for caviar, but Chinese producers have been almost entirely shielded from foreign competition.

No industry has more beef to earn.

Uruguay exports nearly 80 percent of its beef, netting about $3 billion annually, according to the National Meat Institute, a government agency in Montevideo. But the country’s beef producers face tariffs of 26 percent in the United States and more than 45 percent in the European Union, after exhausting small quotas.

That makes China the obvious focus, while sparking bitter talk that Washington has refused to negotiate a trade deal to open the US to Uruguay’s beef exports.

“The US talks a lot about appreciating democracy and human rights in Uruguay, but at the end of the day they turn their backs on us,” said Conrado Ferber, president of the National Meat Institute. “This is why we do business with China.”

Jorge Gonzalez, who runs a slaughterhouse in the modest town of La Valleja, is particularly fond of Chinese buyers because they buy the whole cow. European buyers are usually interested in main parts that make up less than half of a cow. Americans buy a little more, turning less valuable cuts into hamburger meat. But in China, a variety of culinary offerings, such as hot pot, are generating demand for even thinly sliced ​​portions of less valuable meat.

Mr. Gonzalez, 56, buys cattle from surrounding farms and sends them through an assembly line where workers carve the animals into meat and put the pieces into crates. It exports most of its production around the world by container ships. Seventy percent go to China.

His factory had enough capacity to slaughter about 100,000 animals a year, double what it handles now. He said a trade deal with China would prompt local ranchers to produce more.

Mr. Gonzalez is hopeful that some sort of deal can be struck with China given Uruguay’s virtues as a food producer. The country has vast open spaces and nearly four times as many cows as there are cows, making it a profitable place to produce meat for export.

“The Chinese are looking for a guaranteed supply of food,” Mr. Gonzalez said.

El Álamo Farm is one of Mr. González’s suppliers. There, Mrs. Cotterman and her family bet on another side of the Chinese market: a growing appetite for premium beef.

Over the past five years, her farm has invested heavily in producing a growing herd of wagyu—cows originally bred in Japan that are known for their extraordinary tenderness and tenderness. El Álamo paid Mr. González to slaughter Wagyu and sell the meat directly to buyers in China.

There are worse places to have a cow than the rolling hills of a 14,000-acre farm. Gauchos rode out at dawn atop royal horses, driving cows to green pastures surrounded by shaded groves of eucalyptus trees. One morning, when the sun was pale to break through the mist, a veterinarian examined the cows to see which cows were pregnant.

Mrs. Cotterman’s father, Raymond D. Smidt, fears that politics in South America are conspiring to ruin the economy.

In his version, China is the future. Mercosur is the past.

“It’s a dead duck,” he said, referring to the coalition. “We would be better off without Mercosur, and everyone does what they want.”