BERLIN (AP) -- European Union leaders wrapped up two years of negotiations Friday, agreeing on a financial overhaul that would pave the way for new members to join the trade bloc in the coming decade.

The agreement came after 20 hours debate over priorities for the EU's $92 billion annual budget through 2006. The leaders' determination to defend national interests left a package that fell short of the sweeping overhaul originally foreseen.France stood staunchly by its farmers, Spain defended its development aid and Britain refused to leave without a special budget rebate.

"It was an immensely difficult and hugely complex negotiation. But the changes pave the way for enlargement," said British Prime Minister Tony Blair. "Spending has been put far more firmly under control than ever before."

Although watered down, EU officials say the deal will ensure farm spending does not spin out of control when Poland and other poor, farm-intensive nations join the EU.

They hope it will also answer criticism from the EU's trading partners including the United States, Australia and Argentina, which have long complained their exports of grain, beef and other farm products suffer unfair competition from the subsidized products enjoyed by EU farmers.

Germany, the summit's host, appeared to be the big loser. After setting out to cut $3.8 billion of its net contribution to EU coffers, Chancellor Gerhard Schroeder came away with a saving of just $760 million.

Addressing parliament in Bonn hours after the deal, Schroeder acknowledged that Germany "did not get everything we wanted."

Britain won grudging acceptance from its EU partners for an extension of its cherished payback from the Union's coffers worth some $3.25 billion a year. The rebate had enormous symbolic value in the British media who frequently recall former Prime Minister Margaret Thatcher's 1984 campaign under the slogan "we want our money back," which convinced other nations that Britain paid too much into the common budget.

EU leaders said the reforms would allow the 15-member EU to move ahead with plans to bring in new members from the old East bloc. Leading contenders Poland, Hungry, the Czech Republic, Estonia, Slovenia hope to join soon after the turn of the century along with Cyprus and perhaps Malta.

Romania, Bulgaria, Latvia, Slovakia and Lithuania have also started membership talks but are likely to need more time to prepare their economies and political systems.