Reviving global trade talks that appeared to have collapsed 10 months ago, senior trade officials early Sunday agreed on a series of compromises that could translate into far-ranging changes in the farm policies of the United States, the European Union and Japan and reduced trade barriers around the world.

Capping five days of round-the-clock bargaining at the World Trade Organization's headquarters here, representatives of the WTO's 147 member nations agreed on a framework setting the parameters for completing the Doha Round of negotiations. The round, launched in 2001, stalled in September after a WTO meeting in Cancun, Mexico, broke down when a group of developing countries led by Brazil and India squared off against the United States and the European Union over farm subsidies and other issues.

"Today's decision is a crucial step for global trade," U.S. Trade Representative Robert B. Zoellick said at a news conference that began close to 2 a.m. Sunday, about an hour and a half after official approval of the framework accord. "After the detour in Cancun, we have put these WTO negotiations back on track."

European Trade Commissioner Pascal Lamy said: "I said in Cancun that the WTO was in intensive care. Today I can say that it is not only out of the hospital but well and running."

Under the deal struck Sunday, wealthy nations would cut their subsidies to farmers, especially payments that tend to lead to overproduction and gluts in supply on world markets. Such subsidies have been widely condemned for depressing global crop prices and robbing farmers in poor nations of their livelihoods.

In return, developing nations would cut the steep tariffs that many of them maintain on agricultural and industrial goods, expanding market opportunities for rich-country exporters.

But whether those cuts will be deep or shallow, immediate or gradual depends on how far negotiators are willing to go in making concessions as the Doha Round progresses. Sunday's deal leaves a huge amount of detail to be negotiated later, and negotiators here fought hard to keep many of their commitments as vague as possible to maintain their flexibility in the future talks.

The deal's greatest significance may be that it averted a replay of the debacle in Cancun. Many trade experts and officials feared that a second consecutive blowup might delay the Doha Round for years or torpedo it entirely, and some also warned of a potentially damaging impact on the WTO's ability to police global commerce and arbitrate disputes among countries. Already the round is far behind its original timetable of reaching completion by the end of this year.

Asked what the new target date is to end the Doha Round, Supachai Panitchpakdi, the WTO director-general, said only that member countries hope to finish "in the foreseeable future." Still, he said at a news conference, the framework agreement was "historic for this organization," and top officials from a range of countries described themselves as satisfied with the results.

"I think it was recognized here that the developing countries cannot be taken for granted," said Kamal Nath, India's minister of commerce and industry. "The developed nations have comprehended more the concerns of the developing countries."

Martin Redrado, Argentina's chief trade negotiator, agreed, saying, "There's been a tremendous advance" in the text that "assures substantial reform in world agricultural trade."

Among the most important and specific elements of the accord was a pledge that if the round is completed, all subsidy payments to farmers for exported products will be eliminated "by a credible end date." That provision primarily affects the European Union, the biggest spender on export subsidies.

Export subsidies are generally viewed as the most pernicious of rich-country agricultural policies because they go directly for products that are sold abroad.

At the insistence of the Europeans, the pact also calls for the elimination of programs with "equivalent effects" or the placement of strict "disciplines" on their use. These include U.S. export credits for farm goods and state trading enterprises in Canada and Australia.

Other types of farm aid were also targeted in the pact, especially assistance for cotton production, which the United States heavily subsidizes. Because cotton is a major crop in poor African nations, the pact singled out cotton for special attention, with a vow that the round will aim for "ambitious" and "expeditious" cuts in subsidies.

The agreement calls for "harmonization" of subsidy levels, a key demand of the United States, meaning that governments with higher amounts of subsidies -- that is, the European Union -- will be subject to deeper cuts.

At the same time, Washington agreed to a "first installment" in subsidy cuts -- described as a 20 percent reduction that would take effect the first year after the Doha Round is completed. But that concession included loopholes that could make the actual cut in payments to farmers much less than 20 percent of the $19 billion Washington is allowed to make under WTO rules governing "trade distorting" subsidies. For one thing, the United States could reclassify some of its subsidies to a separate category that is subject to looser limits.

With the presidential election approaching, Zoellick was operating under enormous pressure from farm groups not to surrender too much on subsidies unless he was able to secure major concessions from other countries that would enable American farmers to sell more of their production overseas.

On that score, the result -- as in many other areas of the text -- involved a great deal of delicately worded phrases that papered over differences and did not guarantee a commitment to reform.

The wording was included to placate food-importing nations such as Japan and South Korea, which fiercely protect their rice farmers; Switzerland, which shelters its dairy industry; and India, which fears that opening its agricultural markets would devastate its hundreds of millions of subsistence farmers.

The agreement said countries can choose "an appropriate number, to be negotiated" of products that would be deemed "sensitive" -- that is, eligible for relatively high tariffs.

On the other hand, they would have to make "substantial improvement" in the openness of their markets in those areas.

Concerning manufactured products, the agreement calls for nations with high tariffs to cut them more deeply than countries with low tariffs. But many developing countries, anxious to protect their domestic industries, balked at that wording and insisted on adding a paragraph stating that "additional negotiations are required to reach agreement" on the issues involved.

Reluctantly, the United States and European Union bowed to that demand, hoping that in the final negotiations the developing countries will offer major tariff cuts so that they can secure concessions on farm subsidies and other issues.

Despite all the evidence that the negotiators just delayed many disputes, Jeffrey J. Schott, an expert on WTO affairs at the Institute for International Economics, said the accord marks a major advance.

"When you play rugby, and you punt forward, you're making progress," Schott said. "In a lot of the areas where you would like to see more specific commitments, more hard numbers, it really is not doable until you are very close to the completion of the negotiations."

That could likely come in 2006, Schott added, when Congress is to rewrite the U.S. farm bill and the European Union is to change its Common Agricultural Policy.