European leaders will gather on Sunday in a last-ditch attempt to salvage agreement with Greece after months of acrimonious negotiations that have taken the country to the brink of leaving the euro.

But regardless of whether or not fresh funds are now unlocked for the government, some Greek banks, damaged by political and economic havoc, may have to be closed and merged with stronger rivals, officials, who asked not to be named, told Reuters.

One official said that Greece's four big banks - National Bank of Greece (>> National Bank of Greece), Eurobank (>> Eurobank Ergasias SA), Piraeus (>> Piraeus Bank SA) and Alpha Bank (>> Alpha Bank S.A.) - could be reduced to just two, a measure that would doubtless encounter fierce resistance in Athens.

A second person said that although mergers of banks were necessary, this could happen over the longer term.

"The Greek economy is in ruins. That means the banks need a restart," said the first person, adding that prompt action was necessary following any bailout between Athens and the euro zone. "Cyprus could be a role model."

"You have a tiny bit of time ... you would do restructuring straight away."

Greece's financial system has been at the heart of the current crisis, hemorrhaging deposits as relations between the radical left-wing government of Prime Minister Alexis Tsipras and creditors worsened.

After Athens defaulted on debt owed to the International Monetary Fund last month, the ECB froze emergency funding for the banks, precipitating their temporary closure and a 60-euro daily limit on withdrawals from cash machines.

A decision by Greek voters last week to reject bailout terms offered by the country's international creditors prompted the ECB to maintain its cap, meaning that the banks will run out of cash soon.

LIQUIDITY AND SOLVENCY

A year ago, Greece's bankers thought they were on the cusp of a new era. They had restructured as part of the country's bailout deal, had raised fresh equity from international investors and had regained access to debt markets to fund lending.

But the economic and political turmoil that has ensued since Tsipras came to power in January means that they are dangerously short of cash.

Even after the immediate liquidity problems are worked out, any restructuring of the sector would first require a prompt recapitalization of Greece's strongest lenders because rising bad debts and exposure to Greek government bonds mean they are in danger of becoming insolvent.

A timeline and exact plan for the sector's revamp could be finalised after a recapitalization.

Such action would face stiff political resistance in Athens, where Tsipras has pledged to 'restore our banking system's functioning'. Bank mergers save money but cost jobs, making them unpopular.

Reflecting such obstacles, a second person said: "There would be an interest in having less banks ... but I'm wondering whether this would make sense in the short term."

Any closures, which would be managed primarily by Greek authorities under the watch of the European Central Bank's supervisors, would not typically affect customers as their deposits and accounts would migrate to the bank's new owner.

Greece's finance ministry was not immediately available for comment, while a spokeswoman for the ECB said: "The ECB Banking Supervision is closely monitoring the situation of Greek banks and is in constant contact with the Bank of Greece."

CYPRUS MODEL

Any such revamp would be a stark reminder of the withered state of the country's financial system, where deposits had shriveled to their lowest level in more than a decade before savers were forced to ration cash withdrawals.

Of Greece's four big banks, National Bank of Greece, Eurobank and Piraeus fell short in an ECB health check last year, when their restructuring plans were not taken into account.

Only Alpha Bank was given an entirely clean bill of health.

A restructuring could follow a similar pattern to Cyprus, where one of the island's two main banks was closed as part of its stringent bailout, and Ireland, where three lenders were either shut or merged with rivals.

But a senior Greek banker, while acknowledging that the ECB could embark on fresh stress tests and "set the recapitalization, restructuring process going again", said any mergers would reduce competition.

"If the argument is cost efficiency and whether Greece is overbanked, with four players there is a semblance of competition," he said. "With fewer players, competition will be reduced even more."

(Additional reporting by George Georgiopoulos in Athens; Editing by Carmel Crimmins)

By John O'Donnell