MADRID: European leaders have announced that a deal has been reached to resolve Greece’s debt crisis and avoid a historic fracture in the European common currency project. Details are still sketchy at the time of writing, but initial reports indicate that Greece has had to accept a hard bargain.

Donald Tusk, the president of the European Council, posted the news of the deal on his Twitter page at 9 a.m. on Monday. “EuroSummit has unanimously reached agreement,” he tweeted.

Joseph Muscat, the Maltese prime minister, revealed that a deal had been reached shortly before 9 a.m. on Monday as he posted “Deal -JM.”

The deal was reached after 17 hours of negotiations, with details still sketchy. It will provide Greece with its third bailout package in five years. The deal is also in line with the tough terms demanded by Germany and others, who forced an ultimatum on Greece’s leadership, offering the cash strapped country a "time-out" from the eurozone that many say resembles a forced ejection -- if Greece failed to meet the conditions.

The harsh demands include sequestration of Greek state assets to be sold off to pay down debt. Greek state assets worth up to 50 billion euros will be placed in a trust fund beyond the Greek government’s reach -- to be sold off with proceeds going directly to pay down debt. Greece also had to drop resistance to a full role for the International Monetary Fund in a proposed 86 billion euro ($95.78 billion) bailout, which German Chancellor Angela Merkel has declared essential to win parliamentary backing in Berlin.

If a deal had not been reached, Greece would have been faced with shuttered banks on the brink of collapse and the prospect of having to print a parallel currency, with an eventual exit from the European Monetary Union.

Ironically, Greece -- which had rejected harsh austerity measures that would secure the $1.8bn in funds that it needed for a payment to the International Monetary Fund -- is now being subjected to even harsher terms. Greek Prime Minister Alexander Tsipras took the earlier measures to a popular referendum on July 5, with over 60 percent of Greeks voting “Oxi” or no to the terms of an international bailout. Greece's governing Syriza party had campaigned for a "No", saying that the vote would give the country more leverage on the bargaining table.

Instead, Greece seems to be being punished for failing to accept the earlier terms. By Wednesday -- when Greece’s parliament has to vote on the reforms -- Greece has to enact sweeping measures that include spending cuts, tax hikes and pension reforms.

The only concession from the creditors is the dropping of the demand that Greece take a “time out” from the eurozone. In fact, creditors -- led by Germany -- made clear that there would be no compromise. "The most important currency has been lost and that is trust," Angela Merkel told reporters. "That means that we will have tough discussions and there will be no agreement at any price."

If Greece meets the conditions by Wednesday, the German parliament will meet the next day to open talks on a new loan, following which Eurogroup finance ministers can formally launch negotiations.

However, a backlash seems to be brewing, with the country’s labour minister Panos Skourletis denouncing the terms and saying that the deal will lead to snap elections this year. In order to pass the proposals in just three days, Tsipras is expected to start sacking ministers and making dissident lawmakers in his Syriza party resign their seats, Reuters quoted people close to the Syriza party as saying.

That backlash is reasonable given the humiliating terms that Greece has had to accept, especially the sequestering of assets that will further convert the country into what a diplomat has described as a "German protectorate”, stripping it off further sovereignty.

The harsh terms can be seen in line with European ministers opposition to Greece’s left wing Syriza government, which rose to power based on its opposition to austerity measures. As nobel prize winning economist Joseph Stiglitz wrote, “ it’s not about the money. It’s about using “deadlines” to force Greece to knuckle under, and to accept the unacceptable – not only austerity measures, but other regressive and punitive policies… Many European leaders want to see the end of Prime Minister Alexis Tsipras’s leftist government. After all, it is extremely inconvenient to have in Greece a government that is so opposed to the types of policies that have done so much to increase inequality in so many advanced countries, and that is so committed to curbing the unbridled power of wealth. They seem to believe that they can eventually bring down the Greek government by bullying it into accepting an agreement that contravenes its mandate.”

The compromise that made today’s deal possible may just be the catalyst that will bring down the Greek government, giving the European ministers exactly what they want.