World Trade Organization members have agreed a revised draft deal that aims to revive stalled talks on freeing up trade between rich and poor nations.
Brazil's foreign minister called it "a good deal for everybody"
Key WTO members accepted proposals to cut the subsidies wealthy countries give their farmers for exports.
The deal should reduce barriers to international trade and so, it is hoped, lift millions out of poverty.
Brazil's Foreign Minister, Celso Amorim, said the WTO agreement was good for trade and good for social justice.
"This is the beginning of the end for [farm] subsidies. Export subsidies will be eliminated first," he said.
The agreement, agreed late on Saturday in Geneva, puts the so-called Doha round of trade talks back on track, after similar talks in Cancun last September ended in deadlock.
The Geneva talks were extended for an extra 24 hours after the 147 WTO members failed to reach an agreement by the end of Friday, the original deadline.
"Today's news is that the Doha round is back on track," EU trade
commissioner Pascal Lamy said.
"In Cancun I said the round was in intensive care. Today it's
not only out of the hospital but well and running," he added.
US Trade Representative Robert Zoellick said the deal was "a crucial step for world trade".
But even with the latest agreement, the details will still have to be hammered out, and that could take at least another couple of years, says the BBC's John Moylan in Geneva.
A small group of African countries claimed a major breakthrough on their key agricultural product of cotton, our correspondent says.
After hours of talks, key WTO nations, including the US, the EU, Brazil and Japan, agreed to eliminate export subsidies at a date to be set, to limit other subsidies and lower tariff barriers.
In return, wealthier nations, among them the EU's members, are insisting on better access to markets in developing nations.
France, the biggest beneficiary of EU agricultural subsidies, has been highly critical of moves to cut support for farmers.
But EU Agricultural Commissioner Franz Fischler said the EU could "broadly accept" the deal.
Japan and Switzerland were also concerned about the removal of subsidies for some of their agricultural producers.
"The liberalization process will put additional economic
pressure on our farmers," said Swiss President and
Economics Minister Joseph Deiss.
Farm export subsidies eliminated - but timeframe has yet to be set
Stricter rules on state aid for rural development
Developing countries to cut import tariffs for industrial goods
Customs procedures to be simplified
But he welcomed the plan nonetheless: "This will be a key step for the opening of the world economy and this will be of benefit
for all countries."
Healing the rift
The Geneva agreement revives the long-stalled talks on a trade liberalisation treaty that began in Doha in 2001 but which collapsed amid a bitter rift between developed and developing nations in Cancun last year.
WTO Director General Supachai Panitchpakdi said the breakthrough was a historic moment for the organisation.
According to the World Bank, a successful final deal could add $520bn (£280bn; 420bn euros) to the world economy by 2015, if rich and developing countries cut their tariffs.
Most of the benefit would, the World Bank believes, go to poorer countries.
Analysts say it is vital that any new deal be agreed before 2007, when what is known as fast-track legislation expires in the US.
Without fast-track, which limits the power of the US Congress to alter trade deals negotiated by Washington, there is little prospect that the US will adopt a new pact.
EU Commissioner Lamy said that he now believed the Doha round could be completed by the end of 2005.