Late on the afternoon of Friday 10 July, as European finance ministers were packing their bags for Brussels to attend yet another meeting on the Greek debt crisis, a shocking email from Berlin landed in the inboxes of a very small number of top officials. Earlier that week, the Greek prime minister, Alexis Tsipras, had been given an ultimatum by his fellow European leaders: deliver a radical new blueprint for economic reform and spending cuts – or face bankruptcy.

Tsipras had delivered a new set of proposals, but before officials could meet in Brussels to discuss them, the German finance minister, Wolfgang Schäuble, delivered a preemptive strike: if the Greek government would not undertake more drastic reforms, the German email said, “Greece should be offered swift negotiations on a time-out from the eurozone.” There had been speculative talk that Greece might have to quit the single currency – and sentiment among other euro members had hardened against Athens in the six months since Syriza, Tspiras’s leftwing movement, came to power – but until now, no one had formally proposed pushing the country out.

“It was clear,” one recipient said. “It was written down. It was harsh. It was brutal.” Schäuble, the most experienced politician in power in Europe, had gone for the jugular – and the email sent alarm bells ringing in Paris, Rome, Frankfurt and Brussels.

“It was never officially distributed – only to core people,” said a senior official involved in the meetings, who saw the email on the Friday evening. “It showed a tough stance. It was clear that Grexit was an option. It meant that on Monday we would start the preparations.”

Schäuble’s demands gave shape to the weekend of tense negotiations that followed – the most fateful days in the history of the beleaguered single currency, culminating in 17 hours of talks that dragged out until 8.30 on Monday morning. After five years of crisis that had seen Greece bailed out twice – and the rescue of four other eurozone countries – the question was whether Greece could remain in the euro, or become the first country to be kicked out. In order to stay, and secure another bailout, Athens would need to capitulate to German demands on austerity, overhaul its welfare, pension and tax systems, and surrender sovereignty over large parts of policy-making.

Schäuble’s proposal popped up on screens in the upper reaches of the European Commission at around 6pm that Friday. It took the form of a one-page memo – what Eurocrats call a “non-paper” – sent by Thomas Steffen, one of Schäuble’s deputies in the German finance ministry. As well as calling for Greece’s suspension from the single currency for at least five years, it also proposed that Athens would transfer assets worth €50bn – a quarter of the national wealth – into a trust fund located in Luxembourg and controlled by the European Stability Mechanism, the eurozone’s bailout fund. It would be a massive asset-stripping enterprise, modelled on West Germany’s privatisation of East German state property after the fall of the Berlin Wall in 1989: gradually, the assets would be sold off, and the proceeds used to pay off Greek debt.

It seemed like a proposal designed to ensure a Greek departure from the euro: one official from a country participating in the talks recalled that he texted a colleague to say that there was now a “60% chance of Grexit” – for the first time, he said, he thought this was not only possible, but likely.

“A lot of people were really scandalised,” a senior diplomat in Brussels said. “It was incredible. No country could have accepted this.” For Matteo Renzi, the Italian prime minister, the Schäuble ultimatum was an untenable exercise in German humiliation of Greece. It had to be stopped.

A lot of people were scandalised by Schäuble's proposal. It was incredible. No country could have accepted this A senior Brussels diplomat

There were those among the leaders, central bankers, and 19 eurozone finance ministers who wondered whether Schäuble was serious. But senior figures at the European Central Bank, the European Commission and the Luxembourg-based euro bailout fund, who had been involved in negotiations all along, realised he was not bluffing – in fact, they had known about Schäuble’s plans for a long time. They believe that Schäuble made his mind up at the beginning of the year – even before Tsipras was elected as prime minister – that the Eurozone had to be protected from weaklings: Greece was a liability and had to go.

At the age of 73, Schäuble exudes authority and gravitas. The Christian Democrat, who uses a wheelchair after an assassination attempt in 1990 left him paralysed from the waist down, is the longest-serving MP in postwar Germany, and has been at the heart of government since 1989. He ran the negotiations over German reunification, and he was there at the birth of the euro at Maastricht in 1992. Schäuble was the man who translated and articulated Chancellor Helmut Kohl’s shrewd but ill-formed ideas for more than a decade, and Kohl’s hand-picked successor. But the two men fell out over a funding scandal that led to a criminal investigation of the former chancellor and forced Schäuble’s resignation as party leader in 2000. Angela Merkel emerged as the main beneficiary, and the new party leader. Schäuble felt betrayed by Kohl, and has not spoken to him since, but his relationship with Merkel is marked by similar tensions. After a decade in which Schäuble has essentially been the number two in Merkel’s governments, they still address one another with the formal Sie rather than the familiar du in German.

Schäuble’s manoeuvre on Friday 10 July was breathtaking because it broke a taboo: membership of the euro is supposed to be irrevocable, and Schäuble demonstrated for the first time that Germany believed that the single currency was not forever – and that it was willing to push another country out. The revelation scared politicians across Europe. Someone like Renzi, watching the defenestration of Tsipras, could be forgiven for thinking: “Am I next?”

Amid the endless arguments about what to do about Greece’s unsustainable debt levels, the Schäuble paper stated baldly that under the rules governing the euro, there could be no debt “haircut”. If Greece “temporarily” left the euro, however, there could be much more generous action to reduce Greek debt. It sounded almost like bribery: “We’ll pay you to leave.”

Facebook Twitter Pinterest German finance minister Wolfgang Schäuble on a poster in Athens that calls for a no vote in Greece’s austerity referendum. Photograph: Michael Debets/Demotix/Corbis

Jean-Claude Juncker, the president of the European Commission, and his chief of staff, Martin Selmayr, were taken aback by Schäuble’s email, and they immediately summoned the two members of the European Commission responsible for the single currency, Valdis Dombrovskis of Latvia and Pierre Moscovici of France. Juncker also called President François Hollande in Paris: both men were determined to keep Greece in the euro, but they worried that if Merkel shared Schäuble’s resolve to eject the Greeks, they would be powerless to stop her. “Juncker and Hollande agreed this was dramatic and must not be carried,” said a Brussels source. “But no one was sure if this was just Schäuble or whether it had been agreed with Merkel.”

Juncker and his top aides only learned of the Schäuble move on Friday evening. Others who received the email at the same time included the president of the European Council Donald Tusk, and his main aide, the French leadership, the European Central Bank chief Mario Draghi, the Dutch finance minister Jeroen Dijsselbloem – who chairs the so-called Eurogroup meeting of the 19 finance ministers in the single currency – and Thomas Wieser, an Austrian economist and senior Eurocrat who heads the working group of senior officials that prepares the monthly Eurogroup meetings.

Even Merkel was only informed of Schäuble’s bombshell a few hours before his deputy clicked send. “The position was always carefully agreed within the federal government,” Schäuble said later, in an interview for a documentary about his career broadcast on German public television in August. “It was written on a piece of paper in the finance ministry, that’s right. I discussed this word-for-word with the chancellor on the Friday and I also informed the vice-chancellor by telephone. And then we went to Brussels.”

While Schäuble and his fellow finance ministers made their way to Brussels on Saturday morning, Wieser convened his working group of senior officials – but it had effectively been hijacked by Schäuble’s proposal. Although the proposal was not formally discussed, participants said it hovered silently over the session. The meeting was tense and sombre. But it was nowhere near as bad-tempered as what was to come.

The three days that followed Schäuble’s shock announcement would see finance ministers and central bankers locked in negotiations until midnight on Saturday before giving up in failure. They resumed their discussions on Sunday morning, before passing the baton to the national leaders – whose summit began at 4pm and ran through the night for 17 hours.

It was the most intense, most fractious, and most heated debate ever held by those responsible for the European economy – retold here through interviews with more than a dozen of the policymakers, negotiators, and witnesses at the marathon meetings in Brussels. Nobody knew which way it would go until the final hour.

The stakes could not have been higher. Financial markets were waiting to pounce on any signals of weakness when they opened on Monday morning. Kicking out the Greeks would have sent a terrifying signal to the weaker countries of the eurozone, a warning that they must observe German-led instructions on sound budgets, austerity, public expenditure cuts, structural reforms. In short, if they did not become more German, they might become the new Greece.

It was the most intense, most fractious, and most heated debate ever held by those responsible for the European economy

But keeping Greece in the euro would be difficult: after five years of the largest bailout in history, European confidence in Athens had sunk to an all-time low. In Greece, collapsing standards of living, soaring poverty, endless austerity, and the diminishment of national sovereignty had culminated in the election of the eurozone’s first government of radical leftists, who had pledged to defy Berlin and Brussels by rejecting austerity and yet remain part of the Euro.

In the end, it would come down to an unexpected last‑minute compromise between Merkel and Tsipras, after 10 gruelling hours of overnight negotiations.

The previous six months of negotiations with the government of Alexis Tsipras had moved in only one direction – from bad to worse. Since coming into office in January, Tsipras had shown little inclination to strike a deal on the creditors’ terms, and both sides were growing increasingly frustrated.

For the Europeans, the main obstacle was the brash Greek finance minister, Yanis Varoufakis, whose sex appeal and radical rhetoric had grabbed headlines. Varoufakis’s opponents had quickly become irritated by what they regarded as his grandstanding in his monthly appearances before the Eurogroup committee of finance ministers. In his efforts to split the other finance ministers against one another, Varoufakis succeeded only in uniting them against himself. At one meeting in February, Varoufakis and Dijsselbloem had nearly come to blows. Moscovici, the former French finance minister and European Commission member, had to step in to prevent a fight. “There was a moment of physical tension between Dijsselbloem and Varoufakis,” Moscovici revealed in an interview for a documentary that aired on French television earlier this week. “They accused each other of being liars. I had to intervene,” he said. “It took me a moment to separate them.” From that moment on, Varoufakis and Dijsselbloem never spoke again.

By June, the negotiations with Team Tsipras were not just stalemated, they had resulted in a complete breakdown of trust between the two sides. Negotiations were going nowhere. The existing €130bn bailout – Greece’s second – was to expire on 30 June. If the Greeks would not act, the creditors would.

On 1 June, with the deadline fast approaching, Merkel sidestepped Schäuble and Dijsselbloem and called a sudden meeting of key European leaders at her gleaming chancellery in Berlin: Hollande and Juncker attended, along with Mario Draghi and Christine Lagarde, the director of the International Monetary Fund.

Merkel’s mini-summit began late in the evening and lasted until 2am, resulting in a five-page “aide-memoire” that outlined what the Greeks would have to do to salvage the situation. It was the beginning of the endgame.

Merkel’s main aim was to resolve any remaining differences between European leaders and the IMF and ensure they were all on the same page. “Everyone had different interests, but this set out the minimum conditions for a deal with Tsipras,” one person who was present at the meeting said. “We left with the basis for a third bailout.”The next morning Lagarde phoned Merkel to reaffirm what had been agreed and to stress that the IMF wanted no more negotiation. It was take-it-or-leave-it for the Greeks. But what followed was a frantic month of shifting deadlines, multiple “last chances”, several ultimatums, four summits and four meetings of the eurozone finance ministers in Brussels and Luxembourg.

After all this, there was still no deal – and on Friday, 26 June, Tsipras quietly left a summit negotiation in Brussels at lunchtime after having private talks with Merkel. Without telling the Europeans, he returned to Athens and, at midnight, called a national referendum on the terms of a hypothetical agreement with the eurozone, which he described in a speech as “blackmail” and “humiliating”. Merkel was really shocked, according to people familiar with her views. Tsipras hoped that the referendum, which was set to take place on 5 July, would send a powerful message to the other eurozone countries. As the Greek energy minister Panagiotis Lafazanis put it: “If the Greek people say a big no, it is going to be impossible for those who wield power not to take note unless democracy no longer exists.”

Tsipras insisted that the plebiscite was not about quitting the euro. For the furious leaders of the eurozone, that was exactly what it was about: Merkel, and even Hollande – who had been most sympathetic to the Greeks – declared that a no vote would be a vote to leave the single currency. On 29 June, Juncker, in the most impassioned press conference he has ever given, laboured the point against a backdrop of the Greek flag, sounding as if the Europe to which he has devoted his adult life was dissolving.

But the 30 June deadline lapsed without a semblance of a deal, meaning that Greece had no bailout and was broke. In the referendum on 5 July, the Greek electorate listened to Tsipras, rather than the eurozone leaders, backing the prime minister with 61.3% of the vote and delivering a resounding OXI to austerity and the Europeans.

The no vote destroyed what little trust remained between the parties, and Greece’s departure from the euro moved up the agenda. The European Central Bank froze its liquidity support for Greek banks and capital controls were imposed. In Greece, this had an immediate impact, as banks closed and long lines of people formed in front of the few cashpoints that still had notes left to dispense. The brinkmanship on both sides had surpassed all expectations.

But there is nothing Europe’s leaders envy and admire more than success at the ballot box. Tsipras’s 61% mandate told Merkel that the young prime minister was a force to be reckoned with. “They were impressed by how well he won the referendum,” one senior official involved in the negotiations said. “They didn’t like the outcome, but they realised how formidable he is.”

Facebook Twitter Pinterest Euclid Tsakalotos replaced Yanis Varoufakis as Greek finance minister a few days before the showdown in Brussels. Photograph: Angelos Tzortzinis/AFP/Getty Images

This was the unpromising backdrop to the critical weekend of negotiations. Still, in the days before the finance ministers were to meet on Saturday 11 July, there seemed to be a few glimmers of hope. On 7 July, Varoufakis, who had done nothing but exasperate his fellow finance ministers, offered his resignation. The arrival of his replacement, Euclid Tsakalotos, a soft-spoken leftist educated at St Paul’s and Oxford, eased tensions immediately. “The new finance minister had a completely different attitude,” said a senior EU official who dealt directly with Tsakalotos. “They started seeing us as human beings and not as robots. It made things so much easier.”

Tsipras had drastically changed his position on the terms of the bailout. Just days after the Greek people had rejected Europe’s austerity terms, Tsipras performed a u-turn. In order to secure a third bailout, he produced a new set of tough reform proposals very similar to those he had just campaigned against. In a dramatic debate that ended in a vote several hours after midnight on the night of Friday 10 July, the Greek parliament gave Tsipras an overwhelming majority in support of his proposals. Unfortunately, these were the proposals that Schäuble had torn to shreds in his own memo – sent only a few hours before the Greek parliament sat down to vote.

European Union summits take place in a large, charmless pink granite building in Brussels, looking out on a four-lane road that is continuously clogged with traffic headed into the city centre, two kilometres away. Known as the Justus Lipsius building, this is the headquarters of the European Council, representing the 28 member states – and home to the office of Donald Tusk, the council president, who convenes and chairs the summits.

Around here, they are always “building Europe” – and not just metaphorically; the entire quarter is a permanent building site. A little way down a pitted and muddy street, just past a recently demolished Sheraton hotel, sits the glass and steel Lex building. It was here, at 3.30pm on Saturday 11 July, that the Eurogroup of finance ministers sat down with the top officials from the “troika” of Greece’s creditors: the European Commission, European Central Bank and the International Monetary Fund.

The officials from the European Commission and the European Central Bank responded positively to the new Greek proposals: they gave the ministers an initial assessment of the Greek offer, which was viewed as Tsipras’s first serious attempt at compromise, and a decent starting point for that weekend’s negotiations.

But the eurozone’s fiscal hawks were never going to have it: they would author the programme, not the Greeks.

This much became clear when Schäuble and Dijsselbloem arrived, and any early optimism quickly dissipated. “How can we expect this [Greek] government to implement what it is now promising?” Dijsselbloem said to reporters. Schäuble was grim-faced, bristling with contempt. As the media scrum clustered at the entrance to the building for the “doorsteps” that are a curious ritual in the life of a reporter in Brussels, the German predicted “extraordinarily difficult negotiations”.

The Schäuble paper, by now known to most of the participants, had shredded Tsipras’s latest offer. It read: “These proposals lack a number of paramount important reform areas to modernise the country. Labour market reform, reform of public sector, privatisation, banking sector, structural reforms are not sufficient. This is why these proposals cannot build the basis for a completely new, three-year programme.”

Hardliners in the finance ministers’ meeting did not even want to discuss a new bailout, preferring to move straight to talk of how to handle the fallout from ejecting the Greeks. Alexander Stubb and Peter Kažimir, the Finnish and Slovak finance ministers, led the calls for the shift to the so-called Plan B scenario: Greece’s expulsion from the euro. (It later transpired that Stubb had come to the session with instructions not to discuss or endorse a new bailout.)

The prevailing mood at the meeting was aggressively anti-Greek, with the exception of the French, the Italians, and Cyprus. Schäuble was measured, but others, one minister reported, were “unpleasant and nasty” towards Greece.

Over the course of the meeting – described as 'manly' – momentum seemed to be gathering to kick the Greeks out

The only one who directly challenged Schäuble on the fundamental point of ejecting Greece from the currency was Michel Sapin, his French counterpart. Publicly, Sapin would later dismiss the Schäuble paper as “playing to the gallery”. Privately, he told the conference there was no legal provision for a country to leave the currency, temporarily or otherwise. Grexit was not an option. He was right, but this was a legalistic argument: Greece could not be formally ejected, but things could be made so difficult for Athens that it had no choice but to quit.

Over the course of the meeting – which one participant described as “manly” – momentum seemed to be gathering to kick the Greeks out. Schäuble did not say much, but after a few hours, he came up with another intervention calculated to shock. He proposed that all the Greek functionaries working in EU institutions should be ordered back home to Athens to rebuild their own country – on the grounds that they were precisely the kind of people the Greek state needed to overhaul its notoriously dysfunctional public administration. As protesting voices were raised, Schäuble, unrepentant, said: “I’m the only one being creative here.”

The most substantial challenge to Schäuble came from Mario Draghi. He insisted that €25bn in the bailout package had to go to recapitalising Greece’s four main banks; Schäuble complained that €37bn had already been poured into these same banks in 2012, and there was no point repeating the exercise. If the banks were to be shored up, Schäuble insisted, their own investors, shareholders and depositors should be bear the costs of recapitalisation. But Draghi, supported by the commission, argued that such a “bail-in” would trigger a mass exodus of funds from Greece, where capital controls and withdrawal limits had already been imposed to limit a run on the banks.

Mario Draghi, who had declared three years earlier that he would do “whatever it takes to preserve the euro”, would not countenance a Greek exit, while Schäuble remained the most articulate proponent of ejection. The French and the Italians were surprised by how serious most of the other countries were about kicking Greece out. But Dijsselbloem skilfully steered the discussion away from a direct recommendation and, with his team, drew up a statement in the early evening. It was rejected by the hardliners – including the Germans, Slovaks, Finns and Dutch.

Facebook Twitter Pinterest The Bank of Greece in Athens on 7 July. Photograph: Angelos Tzortzinis/AFP/Getty Images

At 7pm, realising that things were going nowhere, Dijsselbloem called a break. As the meeting of finance ministers shuddered to a stalemate, the media went into overdrive. Schäuble’s kick-out-the-Greeks proposal had been leaked – and published on the website of Germany’s leading conservative paper, the Frankfurter Allgemeine Zeitung (FAZ). Officials and spokespeople were deluged with questions about the German ultimatum, but they insisted uneasily that there had been no discussion of Schäuble’s proposed five-year “time-out” for Greece. Witnesses to exchanges between the ministers occasionally surfaced looking panicked. When accosted by reporters they were lost for words.

Through the entirety of the euro crisis, Schäuble’s finance ministry in Berlin has been the most promiscuous leaker of documents on Greece – so it was widely assumed that Schäuble’s office had leaked the paper to Thomas Gutschker, a reporter with the Sunday edition of the FAZ, to step up the pressure on Greece. When asked, Gutschker declined to reveal who had leaked the paper – but three other sources, all of them German, pointed the finger at Juncker’s German chief of staff, Martin Selmayr. According to these sources, Selmayr had hoped to discredit Schauble’s hardline proposal by revealing it publicly.

When the finance ministers reassembled at midday on Sunday, before each of them was a four-page paper that Dijsselbloem and his team had put together after the ministers had gone to bed the night before. “Dijsselbloem and Wieser decided to throw everything into the document,” one of the participants said, “including everything that was not agreed.” The document included the terms of the Schäuble memo, including its two key demands – the five year time-out and the Luxembourg trust fund to sell off Greek state assets – in spite of the fact that several officials protested that it had not been formally discussed the day before. The contentious points were put in square brackets, meaning they had not been agreed. Nonetheless, their inclusion strongly suggested that Schäuble had insisted they remain – and that he still had broad support. In fact, that morning, before Merkel departed for Brussels, Schäuble held a teleconference with her and Gabriel, the vice-chancellor; he was sufficiently confident of their backing to insist that the time-out clause remain an option.

At 4pm on Sunday 12 July, Merkel, Tsipras, and the other 17 Eurozone national leaders arrived for their summit meeting – along with the heads of the European Commision, the European Council, the European Central Bank and the IMF. The mood was already foul. The finance ministers’ meeting the day before had failed to break the impasse, and the arriving politicians were tense and grim-faced.

As late as Sunday morning, it wasn’t even clear who was attending. Earlier in the week, Tusk had declared Sunday could see a “last-chance” gathering of the full European Union – including non-euro members such as the UK – which would have signalled the end for Greece, with a meeting devoted to preparations for the aftermath of the country’s departure. But the Saturday finance ministers’ meeting had been so cantankerous and emotional that Tusk decided at the last minute to assemble only the eurozone leaders, in one last attempt to iron out their disagreements. He was very worried: acutely aware that the Saturday sessions were tantamount to failure, and determined to avoid a complete collapse. The national ambassadors of all the EU countries had also been scheduled to meet for a session devoted solely to dealing with what would come after Greece left the euro. Tusk cancelled it.

The leaders’ summit took place on Level 80, the secure top floor of the dreary council building – a large space with wood panelled walls, where delegates sat around a big oval table or wandered off to confer or make calls – and in Tusk’s smaller office, three floors below. Though there were more than two dozen people in attendance, the meeting essentially revolved around a negotiation between Merkel and Tsipras, mediated by Tusk and François Hollande. The first of their sessions came about three hours into the meeting, when Tusk called a break and summoned the other three into a smaller discussion.

Facebook Twitter Pinterest The Greek prime minister Alexis Tsipras talks to European Commission president Jean-Claude Juncker, French president François Hollande and Belgian prime minister Charles Michel on 12 July, 2015. Photograph: Geert Vanden Wijngaert/AP

“It’s like extensive mental waterboarding,” said a senior official at the time. “They [Merkel and Hollande] need to see if he [Tsipras] is really going to do it.”

Most of the leaders of Europe were mere bystanders to history in the making. They dined. They sipped white wine, made small talk, and napped, while their aides waited in the delegates’ rooms on other floors. The two Italians, Renzi and Draghi – prime minister and central banker – had time to get to know one another better. Juncker, when not sleeping, sat with Draghi to study the complex arithmetic for a bridging loan to forestall a Greek default on its debt repayments. Lagarde and Mark Rutte, the Dutch prime minister, were occasionally engaged by Tusk. The rest idled. The president of Lithuania and the prime minister of Slovenia got fed up and left early.

“We’d never seen anything like this,” one person said. “Three or four people meeting separately and making decisions, and everyone else with nothing to do, some of them dozing. People don’t like that. It left scars.”

Merkel and Tsipras spent more than 10 hours cloistered away from the summit, locked in their own psychodrama, which would make or break the euro. Tsipras, uncomfortable with economic detail, asked if he could bring in his finance minister, Euclid Tsakalotos. No problem, Merkel said – but then, of course, she would need Schäuble. Faces dropped, then lightened. She was only kidding.

Schäuble’s time-out was quickly deleted from the paperwork as gratuitous. If there was going to be a deal, there would be no Greek exit from the euro. If the summit failed, this would be the outcome in any case: there was no need to spell it out.

Tsipras’s own red lines quickly became clear: first, he did not want the IMF involved in another bailout – or at least wished to be spared the embarrassment of requesting IMF assistance. Second, he did not want to submit to the creditors’ insistence that he roll back some of the legislation passed by Syriza – to reverse some pension cuts, halt privatisation, and reinstate some public-sector workers – on the grounds that it had not been approved by the eurozone. Third, and most significantly, he could not accede to Schäuble’s Luxembourg trust fund, which he saw as an outrageous European attempt to pilfer the Greek family silver.

At one point late on Sunday night, Tusk summoned Rutte, the Dutch prime minister, into a smaller meeting with Merkel, Hollande and Tsipras, who an observer described as “very unhappy”. Rutte had a particularly tough position on the demand that Tsipras roll back the legislation the eurozone had not approved; Tusk saw him as a representative of the eurozone’s northern and eastern fiscal hardliners, along with the Finns, Slovaks, and Baltic states. It was Lagarde who helped fix a formula to defuse the legislation issue, according to participants in the negotiation: brought in by Tusk to discuss the matter with Tsipras, she proposed that while some of the laws would have to be undone, others could survive on “humanitarian grounds” – to cushion the impact of austerity for the poorest Greeks.

By three in the morning, things looked bleak. The Greeks and the Germans were immovable. The French and the Italians were alarmed. And the rest of the eurozone countries – including Portugal, Ireland, and Spain, which had suffered through the austerity conditions imposed by their own bailouts – were increasingly unwilling to make concessions to Greece. The willingness to do Athens any favours had melted away.

At this point, Hollande left the meeting and took 10 of his aides, including Sapin, to the office of the Italian delegation. The French president knocked on the window: “Is Matteo there?” He went in and asked Renzi: “What should we do about Greece?” After half an hour of conversation, Hollande and Renzi resolved that Greece had to stay in the euro at all costs. Renzi then went to Merkel and Tsipras, and implored them to strike a deal. “Angela,” he told Merkel, “now you have to decide.”

Half an hour later, at 4am, Tusk was confident enough that an agreement was near that he reconvened the entire summit. A breakthrough appeared to be at hand, although the Greeks were still muttering about the IMF and the Luxembourg trust fund. But then Tsipras disappeared for half an hour to make phone calls to Athens. When he returned at 5am, he was pale and intransigent. No deal. Merkel was similarly stony-faced. But Hollande and Tusk would not countenance failure. Tsipras told them the trust fund was “impossible and unacceptable”.

Tusk again broke up the summit and ordered the Greek, German and French leaders into another session. It was the most brutal of the entire weekend – and came perilously close to forcing Greece’s expulsion from the euro. For three hours, the leaders debated Schäuble’s €50bn Luxembourg trust fund – but none of those present could agree on the figures or the structure. Tusk feared he was presiding over a historic failure. By 6.30am, he was resigned to defeat: he had concluded that Merkel and Tsipras were more concerned about not returning home looking like losers – they were actively seeking ways not to agree.

Almost everyone except Merkel and Tsipras regarded the final sticking point – the trust fund – as faintly ridiculous. The €50bn sum was seen by the others present as an irrelevance: nobody could imagine where Greece was going to find €50bn in assets to privatise, and the idea of surrendering them to a trust fund in Luxembourg was an insult to which no government could possibly agree. “It is not possible to generate this €50bn,” one senior official involved in the negotiations said. “Everyone knew this.” Both Lagarde and Juncker regarded the idea as “symbolic, but ridiculous,”. Other participants recalled that they were astounded to see the trust fund become the ultimate obstacle to an agreement after five years of crisis, describing it as “stupid”, “nonsensical” and “senseless”.

Tusk told Merkel he could not believe the eurozone was flirting with catastrophe because of a paltry €2.5bn

But for Merkel it was a bottom line, an achievement to take home to an increasingly sceptical parliament. For Tsipras, the fund was damaging, but if he had to swallow it, he insisted that it be based in Greece rather than Luxembourg, so he could at least claim some kind of sovereignty over the arrangement. Merkel conceded the point, but she would not agree to Tsipras’s request that half the fund be earmarked for investment in Greece; she would only allow €10bn to be diverted for that purpose, while the other €40bn would pay off Greek debt and aid its ailing banks. There was still no deal. Tsipras faced returning home to a calamity. Merkel wanted to give up, and suggested holding yet another summit two days later.

And then Tusk’s phone pinged. It was a text from Rutte, the Dutch prime minister. He and several other leaders who had been sidelined in the negotiation but were carefully following its progress had assembled a proposal they thought could break the deadlock – Rutte’s text to Tusk suggested that Merkel’s €10bn pot for investment in Greece be increased to €12.5bn. Hollande tried to talk her into it, but she balked. Tusk and Tsipras agreed to the new formula, said to have been devised by the Portuguese prime minister, Pedro Passos Coelho.

Tusk appealed to Merkel’s sense of history, of her legacy. He told her he could not believe that the eurozone was flirting with catastrophe because of a paltry €2.5bn. The European Union was on the brink of political suicide. Merkel agreed to talk about it, to run through the figures and look at different templates for structuring the fund.

Facebook Twitter Pinterest Journalists covering the at 1am on 13 July. They ended at 8.30am that day. Photograph: xh/Xinhua Press/Corbis

A deal was nearly at hand. At 6.30am, Tsipras asked if another member of his team could join the final session to help draft the compromise deal. Heads turned to see Glenn Kim, a Californian investment banker of South Korean heritage, walk into the room – the only one of the Greek negotiators wearing a tie. “It was such a strange thing,” one senior official recalled. “He came straight into the leaders’ meeting. People were surprised – but by that time it was just so late, people were so tired, and it was just one more strange thing.” Kim, a 20-year veteran of Lehman Brothers, who had been sent to London to wind down the bank’s European operations after its collapse, had a sure grasp of the arcane detail of financial catastrophe – which is why he had been hired by Varoufakis, earlier in the year, to beef up an inexperienced Greek team in their negotiations with European creditors.

Now he had joined the negotiation, along with Merkel, Tsipras, Tusk, Hollande and Tsakalotos, for the decisive final steps. After 17 hours shut up together in the European Council headquarters, the eurozone leaders had finally struck a deal. At 8.39 on Monday morning, the Belgian prime minister, Charles Michel – the first leader to grab his phone – sent a one-word tweet: “Agreement”.

In the end, Tsipras had capitulated to a script written in Berlin – reneging on his election pledges and splitting his own party, which did not prevent him from winning the snap election he called in September. But the bigger question may be what the chastening experience of that tense weekend did to Germany and Europe. Schäuble’s bid to banish Greece from the eurozone had not succeeded, but it had resurrected the spectre of German bullying – the outcome of the summit, Munich’s Süddeutsche Zeitung wrote, amounted to a demonstration of German power at the expense of German leadership.

Merkel had listened to Schäuble, opted not to stop him, and then in the end, overruled him – perhaps less for the sake of saving Greece and the euro and more to avoid being blamed for the unforeseeable consequences. When it was all over on Monday morning, her reflections on the deal were typically pragmatic: “The advantages,” she reasoned, “outweigh the disadvantages.”

Additional reporting by Alberto Nardelli

Illustration by Ellie Foreman-Peck

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.