European Union leaders meeting in Brussels have revived the drive to agree a landmark constitution.
The Madrid bombings encouraged EU leaders to display unity
The leaders set themselves a mid-June deadline to broker a deal following last year's collapse of talks amid an acrimonious row over voting rights.
The summit has now turned its attention to world trouble spots, including Iraq and the Middle East.
UK Prime Minister Tony Blair said there was a new sense of EU unity following the attacks in Madrid early this month.
A range of security measures, including the naming of an anti-terrorism co-ordinator, has already been agreed.
Dutch politician Gijs de Vries, who starts work on Monday, will be responsible for pooling Europe-wide intelligence.
The draft constitution was designed to allow the EU to function smoothly once 10 new members are admitted in May.
But talks broke down in December over the distribution of power in the EU Council of Ministers between Germany and France on one hand, and Poland and Spain on the other.
Spain and Poland wanted to stick to the system agreed at Nice in 2000, which gave them influence disproportionate to their size.
But they have now agreed in principle to negotiate
on a version of the "double majority" solution, under which decisions must be passed by more than half the member states, representing more than 60% of the EU's population.
Weeks of patient diplomacy by the Irish have borne fruit, say correspondents.
"We all want to see a new constitution in place as soon as we can," Irish Prime Minister and current EU president Bertie Ahern told a news conference after the meeting of leaders of the 25 current and future EU member states.
He said leaders had unanimously committed themselves to reaching a deal by their next summit on 17-18 June.
"It will help the enlarged European Union to work better and to do more for its citizens - in the end that is the most important thing," he said.
"The difficulty was that people were taking fixed positions and refusing to move. Everybody tonight indicated that they would move towards compromise."
On Friday, Mr Blair said he wanted an early deal - but was not prepared to give away British controls on key policies like tax, defence and criminal justice.
Despite many points of agreement on the draft constitution, leaders were unable to bridge the gap over voting rights the last time they met.
But correspondents say a new spirit of compromise has emerged since the shock election victory earlier this month by the socialists in Spain on the back of the Madrid bomb blasts.
The attacks served to put the obstacles in the way of an agreement into some perspective, they say.
The UK's Europe Minister, Denis MacShane, told the BBC's Today programme that "what we need to see in the constitutional treaty is a rule book to make the Europe of 25 work".
The new Spanish prime minister has taken a more conciliatory tone than his predecessor, Jose Maria Aznar.
And on Thursday, Polish Foreign Minister Wlodzimierz Cimoszewicz said for the first time that Poland did not rule out "the possibility of a compromise based on the double majority".
But BBC Europe correspondent Chris Morris warns that hard work remains ahead.
Even if the leaders succeed by June, the constitutional treaty still has to be ratified in every member state before it becomes law, he says.