"This was the European project that many generations dreamed of and others before us championed, with a vision of the future," Jose Socrates, the Portuguese prime minister, told the leaders at the ceremony.
"Europe was blocked, without knowing how to move forward and we found the solution with this treaty," Nicolas Sarkozy, the French president, said.
The treaty is a toned down version of the constitution and EU leaders hope it will be effective in adapting the bloc's structures to having 27 members, after it opened its doors to 12 mostly ex-communist states in 2004 and 2007.
The bloc's rotating presidencies will end with the new treaty and be replaced in 2009 with a long-term president of the European Council, who will chair summits. The treaty will also create a foreign policy high representative.
It will allow more decisions to be taken by majority voting, notably on justice and security issues, and give more say to the European and national parliaments. A charter of fundamental European rights is attached to the treaty.
In streamlining decision-making and ending a drawn-out process, officials hope the treaty can allow the EU to turn to more important things, such as job creation and facing up to the challenges of globalisation.