As dawn broke in Brussels on Monday, Europe's frazzled leaders gazed into an abyss: the looming exit of Greece from a common currency that symbolized European unity.
Hours past a midnight deadline to clinch a Greek bailout deal, German Chancellor Angela Merkel and Greek Prime Minister Alexis Tsipras were about to walk away from the table — exhausted from all-night talks filled with threats, shouting and ultimatums.
A single text message rescued the talks — and possibly the euro. Dutch Premier Mark Rutte, a hard-liner on Greek reform waiting outside with other leaders, sent European Union President Donald Tusk an SMS proposing a compromise on the last sticking point keeping the two sides apart.
For three hours, Merkel, Tsipras, Tusk and French President Francois Hollande had been stuck in dead-end closed-door talks, and the message suddenly made something click. Within an hour, the deal was clinched.
This account of the dramatic events that led to a last-minute bailout agreement for Greece has been pieced together from interviews with a half-dozen officials from EU nations and institutions who attended the negotiations over the past months. They spoke on condition of anonymity because the talks were not public.
Announcing the deal later that morning, Tusk, the summit host — who had been instrumental in keeping the opposing sides together before the text message landed — tried to lighten the mood with corny humor. "We have an a-Greek-ment," he declared.
It was not enough to sweep away the months of bitterness leading to that moment. The negotiations, watched with trepidation around the world, swung from despair to hope and back again as leaders groped for a pact that would keep Greece in the euro and keep global markets steady.
The Greek crisis, roiling Europe since the election in January of Tsipras — a radical leftist who vowed to free Greece from debilitating austerity — reached a terminal point at the end of June, when the bailout that was keeping Greece afloat was set to expire. Without a deal, Greece would effectively go bankrupt, likely forcing it out of the euro.
Markets were sanguine in the run-up to that deadline, amid signs that the two sides were close to an agreement. But no leader could vouch for what would happen in case of failure.
Deep into the night of June 26, after two promising days of summit talks, technical negotiators sat down at EU headquarters to fine-tune the details of what was expected to be the final breakthrough. So everyone was stunned when the Greek negotiators took cellphone calls, then simply got up and left.
They had been instructed of a bomb-shell dropped from Athens.
Tsipras returned to the Greek capital that night, and hastily convened his Cabinet. Hours later, he made a televised address that shocked Europe: He was calling a referendum for the following weekend on whether to accept the European bailout plan — and advocating a 'No' vote.
"From an economic, financial and social point of view it was an absolute disaster," said Irish Finance Minister Michael Noonan.
Within hours, lines had formed at ATM machines across Greece. The bank run continued throughout the weekend, and the government was left with little choice by Sunday night but to declare that banks would be shuttered the following week. It imposed capital controls, restricting cash withdrawals to 60 euros ($67) per day.