LISBON, Portugal — In the end, the Greeks came bearing gifts.
Prime Minister Alexis Tsipras handed over 11 sheets of paper to other European leaders ahead of a Monday night summit.
In them, he promised to cut pensions, reduce defense spending and hike taxes — pretty much what Greece's creditors have demanded for the past five months in return for more money to keep the country afloat.
Europe's politicians breathed a collective sigh of relief. Markets leapt, apparently convinced the euro zone had stepped back from the abyss.
"We can be optimistic," said Spanish Prime Minister Mariano Rajoy after the emergency talks in Brussels. "Greece has made a proposal in which they've stepped back from many of the positions they had held, this is very positive."
Tsipras' hard-left Syriza party was elected in January on promises to scrap creditor-imposed austerity policies that many Greeks blame for wrecking their economy over the past six years.
After five months of prevaricating, the prime minister has been forced into concessions, agreeing to a continuation of austerity measures to head off a run on the banks, default on debt payments and ejection from the euro zone.
Wary of revolt bubbling among leftist supporters back home, Tsipras insisted the deal will not hit the most vulnerable.
"The burden will not lay on workers and pensioners," he told reporters in Brussels. "We are protecting middle-class families and for the first time the burden will lay on those who can pay."
Without a deal that secures support from Greece's partners in the euro zone, the country would have been unable to meet debt repayments due by the end of this month.
Default would have forced Greece out of the euro currency bloc, with likely apocalyptic consequences for what's left of the economy.
The rest of Europe is also anxious to prevent the much-dreaded "Grexit," fearing shock waves that could trigger another continent-wide economic crisis.
Behind the scenes, Washington has been pressing for a deal to avoid the risk of a strategically located NATO member slipping out of the Western camp into the arms of Russia.
"Europe has to be stabilized," said French President Francois Hollande after the meeting. "I want a lasting solution to this Greek question which has poisoned life in Europe for years."
Not that they actually have a deal yet.
Syriza's amateur-hour negotiating style meant they sent their proposals too late for the euro zone's number crunchers to give their evaluation before the summit.
After the experts finally got their hands on the papers and worked through Sunday night to assess them, Athens called to say they'd sent the wrong draft and the whole process had to start all over again.
But there is hope that another three-day round of summits from Wednesday to Friday will wrap up a deal.
One senior EU official said the Greek proposal meets 90 percent of creditors' demands; another tweeted that the bloc was headed toward a "forceps birth" agreement.
Much now depends on Tsipras’ ability to quell discontent among Syriza lawmakers so they won't torpedo the deal in parliament.
There were dark mutterings among the party faithful in Athens that Tsipras had caved, betraying their leftist principles and risking "social carnage."
The administration is staking its survival on getting the deal through.
More from GlobalPost: Greece is the word once again
"If the agreement is not approved by a majority of lawmakers, the government cannot stay," government spokesman Gabriel Sakellaridis told Mega TV in Athens on Tuesday.
Tsipras has certainly come a long way since negotiations began. His proposals include pension cuts, higher sales taxes, reductions in military spending, privatizations and welfare reforms that Syriza has long resisted, along with raised taxes on corporate income and luxury goods.
The plans aim to boost state coffers by $3 billion this year and $5.8 billion in 2016.
That should appease Germany and other euro zone hawks who had demanded commitments to bolster public finances. But it does little to solve Greece's wider problems — starting with the national debt, which at $360 billion is almost double the country's annual economic output.
Tsipras demands debt relief as part of a wider deal. "This is not an urgent question," was the response from German Chancellor Angela Merkel on Monday.
Then there's the little matter of actually getting Greece working again.
The economy has shrunk by 25 percent over the five years of crisis. Worried savers have been pulling money out of banks since Syriza's election — an estimated $4.7 billion was withdrawn last week alone. The Athens stock exchange has lost over half its value over the past 12 months.
Few believe that hiking corporate taxes and adding a special levy on profits above $560,000 are the best ways to attract the investment the country needs to get going again.
In a crisis where Greek mythology references come easy, a deal this week will generate talk of avoiding the sword of Damocles and cutting the Gordian knot. But the tale of Sisyphus condemned for eternity to roll a rock uphill is hard to avoid.