THEY were bleary-eyed in their crumpled suits early on Friday morning, but euro zone negotiators were smiling after a hard-fought night of talks that struck a surprisingly far-reaching deal to prop up the euro.
An agreement to let the euro zone's rescue funds directly recapitalise banks - something Spain has long held out for - went substantially beyond what almost all diplomats and finance officials expected going into the two-day summit.
It also crossed a red-line that Germany had set down, indicating that Chancellor Angela Merkel had to give ground after being backed into a corner - some said held hostage - by Italian Prime Minister Mario Monti and Spain's Mariano Rajoy.
Shortly before 11 p.m. on Thursday, after nearly six hours of fruitless negotiation, Spain and Italy flatly refused to sign up to a growth pact for the EU unless Germany and others agreed to short-term measures to help them overcome the relentless pressure from financial markets, officials said.
France, the main proponent of the growth pact, tacked towards Spain and Italy, favouring quick action.
Germany, the Netherlands and Finland initially held out, saying they were not going to be 'blackmailed' into delivering short-term relief to struggling states, especially if the help was not accompanied by strict conditions.
One official described the line the Finnish and Dutch leaders took as particularly hard-nosed yet when push came to shove, the threat of the euro zone's third and fourth largest economies being driven closer to the edge, or even over it, was too alarming to contemplate and Germany budged.
One leader in the room played down suggestions that Monti had held a gun to the heads other EU premiers, having threatened ahead of the meeting to drag the summit out until Sunday, but he said it tactics had been uncompromising.
"It wasn't pretty," the leader said. For his part, Monti was straightforward. "The process was tough, but the outcome was good," he said as he left the summit at 5 a.m.
A senior EU official who followed the negotiations via transcripts from the meeting room, on the 5th floor of Brussels' Justus Lipsius building, called "Level 60", said the final agreement was a surprise in how far it went.
"There always looked to be room to move on using the rescue funds more flexibly, but the direct recapitalisation of banks wasn't expected to be part of it yet," the official said.
"That opens the way for a pooling of liabilities and paves the way for a banking resolution fund too," he said.
The deal wasn't crafted by EU leaders. Instead, euro zone deputy finance ministers and diplomatic envoys met in a separate room and haggled for six hours over a four-paragraph agreement that was then put to heads of state.
The agreement contained several critical elements:
* A commitment to set up by the end of the year a supervisory authority for euro zone banks that will be overseen by the European Central Bank.
* Once that body is in place, the ability to use the euro zone's permanent rescue fund, known as the European Stability Mechanism, to directly recapitalise banks, rather than lending to governments for on-lending to banks.
* The removal of senior, or preferred creditor status, from ESM loans, which will calm tensions in bond markets.
* The use of the ESM and the euro zone's temporary bailout fund, known as the EFSF, to buy euro zone bonds at auction and in the open market, which is expected to bring borrowing costs down.
The key link in the chain is the ECB, which through 2-1/2 years of crisis has been the institution that has had the most credibility with financial markets and has frequently pointed the way towards solutions.
By giving the ECB oversight for the euro zone's banks, both the systemically important ones and those at a second tier that are often more problematic, leaders are paving the way for the creation of a banking union for the euro zone, that in time is expected to include a bank resolution fund and shared deposit guarantees.
That puts the ECB at the heart of the effort to break the link between bad banks and highly indebted governments, which has been a central cause of the crisis.
Mario Draghi, the ECB president, welcomed the agreement, taking the rare decision to stroll into the main press area at the summit, where around 500 journalists were gathered, to hold an impromptu press conference.
He was instantly thronged.
"(This) showed the long-term commitment to the euro by all member states of the euro area, and also it reached tangible results in the shorter-term," Draghi said.
But as with every euro zone attempt to counter the crisis since it began in early 2010 - since when 20 summits have been held - the proof of the pudding will be in whether leaders can deliver on their commitments.
The European Commission, the EU's executive, will have to draw up a detailed plan for giving the ECB extra supervisory powers, using the existing EU treaties, and hopes to do it by September, a very tight timeframe.
Then the difficult process of getting all euro zone member states and the European Parliament on board will begin, which leaders are hoping can be finalised by the end of 2012.
"It's very ambitious. There's no hiding the fact that it's a very ambitious timeline," one Commission official said.
The big question is what will happen in the interim.
Spanish and Italian government bond yields fell sharply on Friday, reflecting the positive message the markets took from the summit. But it will be at least seven months before the steps are in place for the direct recapitalisation of banks.
In the meantime, the EFSF and then the ESM, which comes into force next month, will be used to recapitalise Spain's teetering banks with up to 100 billion euros.
Further down the road, officials see the bones of a banking union, including a resolution fund to help wind-up bad banks, coming together - a structure which would make the currency area much safer.
The problem, as ever, is whether there is enough money in the funds to meet all the obligations that could be put on them.
The combined resources of the rescue mechanisms is capped at around 500 billion euros, but with 100 billion already set aside for Spain's banks, if they are also asked to intervene against a hostile bond market, they could run thin very quickly.
The question of whether the currency bloc's "firewall" is sufficiently big is unlikely to go away.