BEIJING (AP) _ After 13 years of fitful talks and six days of grueling bargaining, Chinese and U.S. negotiators signed a breakthrough agreement today that would remove trade barriers and clears the biggest hurdle to China's entry into the World Trade Organization.

The agreement obligates China to cut tariffs an average of 23 percent and promises greater access to the relatively closed Chinese market for U.S. banks, insurers, telecommunications firms and Hollywood film exporters, according to a statement released by the U.S. Embassy.

None of the terms will take effect until China gains entry to the WTO and most would be phased in over five years or longer.

U.S. Trade Representative Charlene Barshefsky and China's foreign trade minister, Shi Guangsheng, signed the agreement. They then shook hands and were joined in a champagne toast by President Clinton's special economics adviser, Gene Sperling, and Long Yongtu, China's lead WTO negotiator.

Barshefsky then went to the Communist Party leadership compound and met Chinese President Jiang Zemin.

``Where there's a will, there's a way,'' Jiang told Barshefsky after the signing.

In Ankara, Turkey, Clinton said the agreement was ``a profoundly important step'' in relations between Washington and Beijing and a boon for the global economy. China's admission to the WTO has been a major foreign policy and economic goal of the Clinton administration.

``In opening the economy of China, the agreement will create unprecedented opportunities for American farmers, workers and companies to compete successfully in China's market, while bringing increased prosperity to the people of China,'' the president said.

``This is a profound and historic moment in U.S.-China relations,'' Barshefsky said.

China's Shi called it a ``win-win'' deal that was ``mutually satisfactory for both countries.''

``We are looking forward to the day of becoming a full member of the WTO, within the year,'' Shi said.

The deal sent stock prices in Hong Kong soaring to their highest level in more than two years. It also brought congratulations from neighbors like Japan and South Korea as well as the Geneva-based WTO.

To get into the WTO, China still needs to negotiate separate access agreements with other key trading partners, the European Union foremost among them. Terms of the U.S. deal will not apply until China gets WTO membership.

However, a WTO official in Geneva said China is unlikely to join before its 135 current members meet in Seattle on Nov. 30 to try to launch new trade liberalization measures.

The U.S. Embassy said China will eliminate export subsidies, double the number of foreign films it allows in each year to 20 and allow American firms to finance car purchases. With the deal, China will also put into effect an April agreement that will slash tariffs on agricultural goods and provide larger import quotas for wheat, corn, rice and cotton.

It was unclear whether the agreement went beyond concessions Premier Zhu Rongji made in April and that Clinton rejected. Barshefsky's office published a list of those concessions, allowing Chinese opponents of WTO to lobby the Chinese leaders to back down. Anti-U.S. sentiment ignited by NATO's bombing of the Chinese Embassy in Yugoslavia in May made accommodating Washington politically dangerous.

In April, Washington had pressed for foreign majority ownership in telecommunications and an end to barriers for U.S. financial firms. It also asked China to agree to quotas on textile exports for five years, a demand China rejected.

Barshefsky and Shi made slow progress in their six days of negotiations. Even after an intervention by Zhu, a nearing trade deal unraveled, forcing two more days of nearly nonstop negotiations.

Time has been pressing for agreements on China's entry to WTO. At month's end, WTO members will discuss launching new global trade liberalization talks, and China wants to be part of those talks.

There has been concern that once trade ministers start negotiating new trade liberalization measures they would be too busy to take up Beijing's entry for several years.

U.S. businesses in China expressed immediate delight at news of a deal and predicted that U.S. companies would invest more once China is bound by the WTO's trade rules. The deal would lead to increased trade that will benefit both countries, they added.

``Implementation of WTO standards will reduce many of the distribution and regulatory hardships that U.S. businesses now face in China,'' said John Sullivan, vice chairman of the American Chamber of Commerce in China. ``That means more growth potential for American companies and creation of more jobs back home.''