Euro zone leaders at a marathon emergency summit on Greece have reached agreement, officials said.

"Agreement," said Belgian Prime Minister Charles Michel in a one-word tweet. The Cyprus government spokesman tweeted: "Seems we have a deal."

EU's Tusk says 'unanimous' agreement for Greece bailout deal, AFP reports.

Earlier, the labour ministry had said that the majority of the Greek government was in a question.

Agreement — Charles Michel (@CharlesMichel) July 13, 2015

To Potami

The Greek opposition party To Potami will not enter a national unity government with the ruling Syriza party, but will support a solution for the nation's interests, a party official said on Monday.

Euro zone leaders argued late into the night with near-bankrupt Greece at an emergency summit, demanding that Athens enact key reforms this week to restore trust before they will open talks on a financial rescue.

"We are not pursuing a role of a governmental partner in a Syriza government, but we are expressing our availability to the prime minister to find solutions for the nation's interest," the official said.

Elections again

The bailout offer being put to Greece is unviable and will require the support of opposition lawmakers or a national unity government to implement, Labour Minister Panos Skourletis said on Monday, adding there would bea snap election this year.

Skourletis also said those lawmakers who had vetoed the terms of bailout discussions should resign.

Euro zone leaders argued late into the night with near-bankrupt Greece at an emergency summit, demanding that Athens enact key reforms this week to restore trust before they will open talks on a financial rescue.

"In different circumstances, if there was normality, if there were no capital controls and a banking problem, I would immediately say that we should go to elections," Skourletis said.

"The measures of the forthcoming deal plan are not viable," he said.

Haggling through the night

Euro zone leaders argued through the night with near-bankrupt Greece about terms for a third bailout to keep the country in the euro zone but theemergency summit was still deadlocked at breakfast time on Monday.

EU officials said leftist Prime Minister Alexis Tsipras had accepted most of the tough conditions imposed by international lenders but was continuing to reject German-led demands for the sequestration of state assets to be sold off to pay down debt.

Tsipras also resisted 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.

Lithuanian President Dalia Grybauskaite left the summit just before 8 a.m. (0600 GMT) saying a deal was tantalisingly close. "Almost," she said when asked if there was an agreement.

As the hours ticked away overnight, most of the leaders were forced to cool their heels, playing computer games or taking a nap in their delegation offices while the leaders of Germany, France and Greece and European Council President Donald Tusk met several times privately to try to cut through the final knots.

On many issues, Tsipras had to accept what resembled surrender terms, abandoning any hope of the end to austerity he had promised Greeks when his radical leftist Syriza party was elected in January.

If there is a deal, he will have to rush swathes of legislation through parliament this week to convince his 18 partners to release bridging funds to avert a state bankruptcy and just to begin negotiations on a three-year loan.

If the summit fails, Greece would be staring into an economic abyss with its shuttered banks on the brink of collapse and the prospect of having to print a parallel currency and in time exit the European monetary union.

Six sweeping measures including spending cuts, tax hikes and pension reforms must be enacted by Wednesday night and the entire package endorsed by parliament before talks can start, the leaders decided.

In almost the only concession after imposing a tough set of terms on Tsipras, Germany was ready to drop a proposal to make Greece take a "time-out" from the euro zone that many said resembled a forced ejection if it failed to meet the conditions.

Tsipras said on arrival in Brussels on Sunday he wanted "another honest compromise" to keep Europe united. Instead, he was subjected to a 15-hour humiliation by leaders furious that he had spurned their previous bailout offer on more favourable terms in June and held a referendum last week to reject it.

One senior EU official calculated the cost to the Greek state of the last two weeks of political and economic turmoil at 25 to 30 billion euros.

HARD BARGAIN

Merkel, whose country is the biggest contributor to euro zone bailouts, warned from the start that she would drive a hard bargain against a backdrop of mounting opposition at home to more aid for Greece.

"The most important currency has been lost and that is trust," she told reporters. "That means that we will have tough discussions and there will be no agreement at any price."

If Greece meets the conditions, the German parliament would meet on Thursday to mandate Merkel and Finance Minister Wolfgang Schaeuble to open the talks on a new loan. Then Eurogroupfinance ministers could formally launch the negotiations.

Perhaps the toughest condition for Tsipras to swallow was Germany's insistence that Greek state assets worth up to 50 billion euros be placed in a trust fund beyond government reach to be sold off with proceeds going directly to pay down debt.

Berlin initially wanted to use a structure in Luxembourg managed by its own national development bank, KfW, but diplomats said it was flexible on the location.

EU and IMF experts evaluate Greek assets currently earmarked for privatisation at just 7 billion euros.

One diplomat said that was tantamount to turning Greece into a "German protectorate", stripping it of more sovereignty.

But Merkel declared the matter a "red line" for Germany.

For his part, Tsipras demanded a stronger commitment by the creditors to restructure Greek debt to make it sustainable in the medium-term. That could be his only hope of selling such a deeply unpalatable package to his own supporters and the public.

An EU official said several options were under consideration to give Greece bridging funds once it passed the laws, but no final decision was taken.

They included releasing European Central Bank profits on Greek bonds, tapping an emergency fund run by the European Commission, or bilateral loans from friendly countries such as France. Two French sources denied any bridging loan was planned.

Finance ministers said Greece needed 7 billion euros of funding by July 20, when it must make a crucial bond redemption to the European Central Bank, and a total of 12 billion euros by mid-August when another ECB payment falls due.

Some diplomats questioned whether it was feasible to rush the package through the Greek parliament in just three days. Tsipras is set to sack ministers who did not support his negotiating position in a vote last Friday and make dissident lawmakers in his Syriza party resign their seats, people close to the government said.

Greek sources said Tsipras feared a public backlash in Greece when the terms of the bailout become known.

Even while Tsipras was still at the table in Brussels, one of his ministers went on television to say he could not blame lawmakers who would find it hard to say 'Yes' to the emerging cash-for-reforms deal.

"It's clear this deal does not represent us," Labour Minister Panos Skourletis told state broadcaster ERT.