EU leaders have expressed measured approval of a draft treaty to reform EU systems agreed at a summit in Brussels.
Germany had made a new treaty a priority of its EU presidency
German Chancellor Angela Merkel hailed a good compromise with Poland over planned changes to voting rights, which proved the key to the final agreement.
French President Nicolas Sarkozy said Europe was moving again, while British PM Tony Blair said the EU could now concentrate on issues of real concern.
The treaty, to be finalised later this year, will come into force in mid-2009.
Following marathon discussions which were at times on the brink of failure, leaders from the 27-member bloc emerged smiling at dawn on Saturday to announce the results.
Having led the negotiations and brokered the compromise, Ms Merkel, the current EU president, said: "We are very, very satisfied with what we have been able to conclude."
Poland's President Lech Kaczynski, whose objections to proposed voting rights almost de-railed the summit, said his country would now be able to co-operate better with its partners.
"We really were fighting but we also encountered solidarity. The striving for success was something that was observed on everybody's part and Poland understood this," he said.
The new treaty preserves much of the planned EU constitution, which was rejected by French and Dutch voters during referendums in 2005.
It will need to be ratified by each of the EU's member states.
Tony Blair said that the arduous process had shown why the treaty was needed - to streamline EU mechanisms which were not designed for the current number of states.
Mr Sarkozy said the treaty was crucial for the future, adding that there were no winners or losers.
"The mandate is clear and precise and the dates are fixed. And you will now have a Europe with institutions. This is a very important message," he said.
Mrs Merkel conceded the talks had been hard - with Poland, the UK and the Netherlands each staunchly defending their interests.
The main obstacle had been Poland's demand to keep its voting power, which is currently almost equal to that of Germany's, even though its population is only half as large.
The new system - known as a "double majority" - will now be phased in beginning in 2014 and fully implemented three years later.
Under this system, a 55% majority of EU countries with at least 65% of the bloc's population will be required for a change to be approved.
Britain and the Netherlands also got what they wanted from the summit.
Mr Blair wanted to ensure the Charter on Fundamental Rights would not alter British law, and to maintain national control over foreign policy, justice and home affairs.
The Netherlands, too, was satisfied that the role of national parliaments in Europe is to be strengthened and the criteria for new members joining the EU are included in the treaty.