Wild monkeys and Buddhist shrines outnumber any signs of industry, and rampaging elephants are not uncommon. The closest port lies seven hours away, down a rutted road. Yet here in the jungle of this small island nation in the Indian Ocean, the Daya Apparel Export Ltd. factory and others like it churn out pants and shirts for American Eagle Outfitters, A-line skirts for the Gap and bras for Victoria's Secret.

"If I didn't have this job, we wouldn't have enough to eat," said 20-year-old Mohammed Ismail Mazeela, one of 2,000 women from surrounding villages who work at the plant. The $40 monthly wage supports her family in Sammamthurai village, where people walk trash-strewn lanes in bare feet. It buys the electricity powering the lone bulb in her shack, the food her mother cooks over the wood fire on their concrete floor, and schoolbooks for her sister's three children. "There is nothing else here."

Soon there may be even less. On Jan. 1, World Trade Organization rules governing the global textile trade will undergo their biggest revision in 30 years. The changes are expected to jeopardize as many as 30 million jobs in some of the world's poorest places as the textile industry uproots and begins consolidating in a country that has become the world's acknowledged low-cost producer: China.

About $400 billion in trade is at stake, but the implications are greater than the money involved. Since 1974, many developing countries have pinned their economic hopes on a complicated system of worldwide quotas that guaranteed each a specified share of the lucrative textile markets in the United States and Europe. By specifying how many blue jeans or how much fabric an individual country could export, the quotas have effectively limited the amount of goods coming from major producers like China, while giving smaller or less competitive nations room to participate. Capital and jobs followed the quotas, helping countries build an industrial base through textile exports.

The jobs are low-paying and tough: Overseas textile plants have been a central target for labor and human rights activists. But the textile industry has, since the Industrial Revolution, provided an opening wedge for broader economic development, and officials in dozens of countries hoped it would continue to do so.

Now, in a matter of weeks, those quotas will be scrapped. Buyers for companies like J.C. Penney Co. or Banana Republic Inc. will be able to purchase as much as they want from whoever gives them the best price -- and there is widespread agreement that China will capture an increasing share of the trade. The coming transition has already prompted factory closings in places such as Honduras, worry about falling wages and labor standards in Cambodia, and a general despair in Sri Lanka and dozens of other countries expected to lose a key economic prop.

If the emerging world economy has sparked anxiety among white-collar Americans about outsourcing abroad, the expiration of the textile quotas signals that, in the endgame of globalization, even sweatshop jobs can be undercut.

"You're dropping us in the well on the first of January with no rope. Fifty to sixty thousand people might lose their jobs. Fifty to 100 factories will be closed," said Sri Lanka's minister of trade, Jeyaraj Fernandopulle, whose country of 19 million depends on the garment industry for 450,000 jobs, more than half of its exports and as much as one-sixth of its total economic activity. "Most of the factories are in rural areas. Almost all the families are dependent on their wages. All their livelihood is gone when you take off the quota."

With the new system so close, buyers from companies like Wal-Mart Stores Inc. say they have already set plans to collapse their business from factories in dozens of countries down to a carefully hedged and competitive few -- with China topping the list.

"That's about it," said Andrew Tsuei, Wal-Mart's global procurement chief, who expects to reduce the number of countries where Wal-Mart has apparel deals from around 63, cobbled together based on which countries have room to export under their quota limits, to a mere four or five that can produce as much as Wal-Mart orders. "The overall balance of quality, reliability and price makes China probably the most competitive market in the world."

The result is a likely bonanza for consumers. The United States alone imports approximately $90 billion worth of textiles annually. Under the new system, prices of blue jeans, men's shirts and other types of clothing now governed by quotas could fall by as much as one-third, as production shifts to lower-cost locations.

However, it has left development and trade officials in other countries worried about their future in a global system that makes job security for seamstresses in Asia, Africa and Latin America dependent upon the decisions of buyers in Manhattan and industrial policy in Beijing.

In Honduras, Minister of Industry Norman Garcia said he hopes the country can hang on to most of its 130,000 textile jobs but acknowledges that economic survival may require a detour back to agriculture. At least, he said recently, economic success for China's 1.3 billion people will probably mean rising prices for the melons, peppers, shrimp and fish that Hondurans can harvest year-round.

"If the Chinese are destined to become the manufacturing center of the world," he said, "somebody's got to feed those guys."

Initially rooted in efforts to protect developed world factories by limiting imports, the textile quotas evolved into a sort of de facto economic aid, awarded as a way to spread the wealth of U.S. and European consumers around the globe. Ironically, many of the same countries voicing concerns today about the end of quotas argued for decades that they should be abolished. At the time, those countries believed that scrapping the quota system would give their textile companies unlimited access to the United States and Europe -- a sure path to riches. They got their way when the member states of the World Trade Organization in 1994 agreed that the Multifibre Arrangement would expire after 10 more years, ending one of the world's more extensive exercises in managed trade.

That position now stands as a colossal miscalculation, which failed to factor in the rise of China. The world's most populous country was on the outskirts of the global economy at that point, and there was little inkling that its cautious economic reforms were about to begin reshaping international commerce.

Since then, China's increasing efficiency and its burgeoning, low-cost partnership with U.S. consumers have prompted other textile-exporting countries to appeal to Washington for new preferential trade agreements. The quota system is independent of the customs duties that the United States and Europe apply to imported textiles, which average 16 percent in the case of the United States. Countries such as Cambodia and Honduras have asked that, as the quota system disappears, their goods be given duty-free access to the United States to give them a cost advantage over China. U.S. textile executives, concerned about the approximately 695,000 jobs left in the dwindling U.S. industry, likewise have asked that the Bush administration use its power under global trade rules to limit the growth of Chinese imports until 2008.

These sorts of measures, like the quota system itself, may distort free trade. But proponents argue that China has its own unfair advantages -- including currency rules that keep its goods cheap, hidden subsidies and, most significantly, abusive labor standards of the sort that other countries have been under world pressure to correct.

At the Brandix factory in Sri Lanka, workers sort garments. One-sixth of Sri Lanka's economy and 450,000 jobs come from its textile industry.At the Timex (Garments) Ltd. factory in Sri Lanka, workers stitch bras for major U.S. brands. China's efficiency and speed to market may lead to substantial layoffs in Sri Lanka.