But the modest progress achieved at Sunday's meeting in Hong Kong left some disappointed.
The deal is on cutting trade barriers and pressure is on the WTO if it hopes to forge a global trade treaty by the end of next year.
Peter Mandelson, the European Union trade commissioner, said the agreement was not enough to make the meeting a success, but enough to save it from failure.
Mandelson's delegation came under heavy pressure during the gathering to open up Europe's farming market.
Outside the convention centre, at least 5000 demonstrators marched in an anti-WTO parade through downtown Hong Kong, a day after hundreds of protesters were arrested in one of the city's worst spasms of street violence in decades.
The demonstrators chanted "Sink WTO" as trade ministers from around the globe wrapped up the talks. The protesters claim the WTO's attempts to open up markets benefit big companies and the rich at the expense of ordinary workers and the poor.
Activist Leung Kwok-hung
outside the WTO talks
After all-night negotiations, delegates resolved the most contentious issue of the meeting: agreeing to eliminate farm export subsidies by 2013, according to a copy of the final draft that was circulated on Sunday.
The tentative agreement, subject to final approval by all 149 member countries and territories at a meeting later in the day, also addressed cotton export subsidies and a package granting the world's poorest nations special trade privileges. Since the WTO is a consensus-based organisation, an objection by even one member could torpedo a final deal.
But delegates appeared to be moving towards agreement. Celso Amorim, the Brazilian foreign minister, said the draft was reasonable and that he hoped it would be adopted by all WTO members.
Kamal Nath, India's trade minister, said: "We welcome it. It is focused and it strikes at various problems of developing countries."
Still, the draft represents a far less ambitious agreement than delegates had hoped to achieve in Hong Kong: a detailed outline for a binding global free trade agreement by the end of 2006, concluding the current round of development-oriented trade talks that began in 2001 in Doha, Qatar.
"We must maintain momentum. You don't close divergences by taking time off to have a cup of tea"
In a step that moves members towards that treaty, the revised text also sets 30 April 2006 as a new deadline to work out formulas for cutting farm and industrial tariffs and subsidies - the nuts and bolts of an eventual trade pact.
The draft agreement noted "the compelling urgency of seizing the moment and driving the process to a conclusion as rapidly as possible. We must maintain momentum. You don't close divergences by taking time off to have a cup of tea," it said.
Pushing back the 2013 date for eliminating farm export subsidies was a key demand of the 25-nation European Union, which held out against intense pressure from Brazil and other developing nations to end the payments by 2010.
Developing nations say the government farm payments to promote exports undercut the competitive advantage of poor farmers.
Amorim was still satisfied with the agreement because it included a provision that a substantial part of the subsidies would go "the first half of the implementation period," suggesting sometime before 2013.
The EU disputes this, insisting that it will not phase them out before that date.
The final draft also calls on wealthy nations to allow duty-free and quota-free privileges to at least 97% of products exported by the so-called least developed countries by 2008.
In a victory for West African cotton-producing nations, the text retained an earlier proposal that rich countries eliminate all export subsidies on cotton in 2006.
Those opposed to farm aid
says it helps only the rich
It also represents a concession by the United States, a major cotton exporter, and Rob Portman, the US Trade Representative, had said the proposal would be a hard sell to US lawmakers. Cotton growers in Burkina Faso, Benin, Chad and Mali say the US farm aid drives down prices, making it impossible for small family farms to compete in international markets.
Portman was noncommittal, saying he had concerns about the final draft but hoped to end up with an acceptable version.
"Some members have concerns as we do, but in the end there is an overriding need to come together and work out our differences so I'm hopeful we can do that," Portman said as he headed from his hotel to the convention centre after reading the draft.