With a clink of champagne glasses at a signing ceremony here, China today took an enormous and risky step toward creating a new, more open economy and political system.

In agreeing to join the World Trade Organization, the world's largest nation pledged to allow foreign competition that is expected to eliminate more than 10 million jobs on China's farms, in its auto factories and in other sectors over the next five to 10 years.

But the deal also is expected to create millions of new jobs in Chinese textile plants and other businesses, as the United States and other countries lower their barriers to China's products. The pact will bolster China's burgeoning private firms, putting them on equal footing with state-run and foreign companies for the first time. China's legal system, accounting methods and other bureaucratic practices will be pressured to catch up to foreign standards.

And the bargain will have long-lasting political and diplomatic results, such as strengthening reformers in the Chinese leadership and resulting in closer relations with the United States and Taiwan.

The agreements were announced after six days of nail-biting negotiations by U.S. Trade Representative Charlene Barshefsky and her Chinese counterpart, Trade Minister Shi Guangsheng. Assuming that China's entry in the WTO goes forward without hitches, as now expected, the agreements will open China's markets to foreign goods and services, lower tariffs, facilitate foreign investment and protect Chinese exports.

But they affect much more than tariff rates or market barriers. They provide a vision for China's future that will ultimately affect everything from how millions of farmers and workers live, to what cars the Chinese drive, where they bank and what movies they will see.

China's decision to sign reflected a victory for reformists, led by Premier Zhu Rongji, who favor modernization and integration in the world economy. They are hoping that the resulting boost to the economy--especially to the private sector, which gains new markets and access to foreign investment and technology--will more than compensate for any social unrest caused by a temporary increase in unemployment and other dislocation.

One Western research firm said the agreement was as important as the historic decision in 1978 by China's reformist leader Deng Xiaoping to allow foreign investment in China as part of a broader plan to set aside Maoist political struggle and focus on modernizing China's economy.

China, like all countries, could cheat on its promises within the WTO to lower trade barriers and allow foreign competition. But it will be held to internationally recognized standards, a critical change for a country that has argued for decades, even centuries, that it was somehow special and not bound by international rules and norms.

"With the WTO deal, you are locking China into the international market system, and--this is the most important thing--irreversibly," said Xiao Geng, a prominent adviser to the Chinese government. "The legal system, all the economic regulations: monopoly, safety, environmental, domestic trade, ownership, the banking system. So many regulations have to be adjusted to be consistent with the WTO system."

The deal will link Beijing's relations with Washington to the stable stake of mutual economic interest. U.S.-China ties have foundered since they lost their strategic purpose following the disintegration of their common enemy, the Soviet Union. Chinese and U.S. officials hope the WTO deal could revive U.S. ties to China by bringing the economy of the most powerful nation closer to that of the most populous.

"The United States and China had a rather tumultuous relationship, as you know," Barshefsky told reporters in Beijing today. "Ups and downs, lots of swings. But an agreement of this sort, with its breadth, with its scope, with its emphasis on rule of law, with its consistency with China's own internal reform process, can help to anchor the relationship between the United States and China in a most fundamental way."

The deal will force China and Taiwan a step closer to economic integration, which could lead to reduced tensions across the Taiwan Strait. Upon China's accession to the world trade body, Taiwan, which already indirectly trades more than $30 billion a year with China, also will become a WTO member as a separate customs territory. This will oblige Taiwanese authorities to lift most, if not all, bans on direct trade with the mainland.

While many of the segments of today's agreement will be phased in over many years, the significance of the deal is difficult to exaggerate.

The World Bank estimated that the deal could cause China's share of global trade to more than triple to 10 percent, making it the world's second largest trading nation. Two Western firms said the WTO deal would add 0.5 to 1 percentage point to China's annual economic growth rate each year.

Over the course of five years, China will dismantle a huge network of state-run firms that have monopolized distribution of products throughout the country and their import and export as well. In its place, foreign firms and private Chinese firms will be allowed to compete. Indeed, the elimination of the state-run middleman, skimming profits and lowering efficiency, is one of the hallmarks of today's deal.

Perhaps the most significant area of change will be in China's countryside, home to more than 800 million of China's 1.3 billion people. Tariffs on many agricultural products will drop, allowing large quantities of American corn and other grains to flow into China. China also committed to stop subsidizing its farm exports.

These changes would lead to a doubling of China's agricultural imports within several years, costing the jobs of about 10 million farm workers, according to Chinese and U.S. economists. That will spark a massive movement of unemployed people from the countryside to the cities by 2005, said Shawn Xu, head researcher at the China International Capital Corp. in Beijing.

Once in the cities, these rural migrants will find a landscape also changed by the WTO. Millions more workers will be unemployed in heavy industries and the consumer goods sector as China's tariffs drop in general from more than 20 percent to 17 percent. Add the urban unemployed to the out-of-work farmers and a potential social volcano will be waiting to explode, Xu said.

The only way to avoid that result will be to construct a social safety net that can catch China's dispossessed. "In our opinion, China's social security system is far from ready for the structural change in employment that would be brought about by WTO accession," Xu said.

Increased imports of foreign automobiles could result in the firing of 500,000 Chinese automotive workers over the next decade, Chinese and U.S. researchers say. By 2006, China will reduce tariffs on automobiles to 25 percent from the current 80 percent to 100 percent. China also will allow foreign financing of car purchases.

The auto industry illustrates how the central government in Beijing can use WTO rules to force difficult but necessary reforms on local political bosses.

China's high automobile tariffs, which once reached 200 percent, guaranteed that the automotive business was profitable. Seventeen of 30 provincial governments built their own auto plants, many without Beijing's approval.

By cutting tariffs, China will force these firms to consolidate into a smaller number of more efficient companies, a goal that Beijing has tried and failed to achieve by administrative means. A similar, WTO-triggered consolidation is expected in China's petrochemical industry.

Other areas of China's economy will grow, especially China's textile mills. They are expected to add 5.3 million workers, as the United States phases out quotas on imports of Chinese textile products.

Chinese officials hope the growing textile firms will create jobs for newly unemployed farmers. "Urbanization is a key ingredient in a modernized economy," Xu said. "WTO would push this process along."

The WTO deal also will transform how China's people communicate--and speed along changes already underway as more Chinese log on to the Internet and find ways around the telephone monopoly known as China Telecom. This deal is another example of how China's leaders, in this case Prime Minister Zhu, are using the WTO to break the power of entrenched interests that are resisting competition.

U.S. negotiators won a commitment by China to allow 49 percent foreign ownership of all telecommunications companies from the date of China's accession, and 50 percent after two years. Although this reflected a compromise, in which the United States backed away from earlier demands, it marked a significant defeat for Wu Jichuan, the powerful minister of information industries. He has opposed foreign investment in China's telecommunications market.

The political ramifications of China's WTO entry could be profound, according to Western and Chinese analysts. In the short term, the agreement is bound to bolster the fortunes of Zhu, who met with American negotiators twice to break logjams in the negotiations.

"Now Zhu is back," said a Western diplomat. "Generally, this is good news for China."

Long term, the WTO deal could sustain the forces for economic and political reform in China. Over the last year, China's economic transformation has been slowed by the conservative Communist Party officials and bureaucrats attached to powerful Chinese ministries concerned about losing monopolies. But as today's agreement is implemented, these officials will lose influence.

A major danger is that as the WTO reforms unfold, too many people will lose their jobs too quickly, creating the potential for a backlash. Western economists say China must create a social safety net to cushion the WTO's blows.

"If not, things could get extraordinarily ugly," said a Western diplomat. "China must figure out a way to find jobs for millions of people each month."