That flexibility may mean that European taxpayers cannot be given cast-iron guarantees that they will not be called upon again to bail out banks as during the financial crisis.

Euro zone finance ministers this month agreed an 86 billion euro ($98.6 billion) third aid deal for Greece which includes 25 billion euros for plugging capital gaps at the country's banks.

The banks' senior bondholders will be "bailed in" -- seeing the value of their investments written down -- but depositors will be protected to avoid harming the wider economy.

It marks a "pick and mix" application of new EU rules that come fully into force in January to ensure that all stakeholders in a bank, from shareholders to creditors and uninsured depositors, contribute to a rescue before public funds can be called on.

The risk is that excluding some stakeholders could create a shortfall that taxpayers are once again left to plug.

Analysts believe that even if the new EU rules, known as the bank recovery and resolution directive or BRRD, had been in force, euro zone ministers would probably still have chosen to exclude uninsured Greek depositors.

A rescue package for Cyprus in 2013 imposed a levy on the "uninsured" money above 100,000 euros ($114,000) held in depositor accounts, triggering public protests.

GLIMPSE OF THE FUTURE

Nicolas Veron, a financial services expert at Brussels think tank Bruegel, believes lessons from the Cyprus experience led to Greek uninsured depositors being left untouched and gave a taste of how banking crises will be handled in future.

"We are still in the early stages of discovering what the BRRD implies in practice and the transition is going to be long, shaped by individual cases and not just by the legislation itself," Veron said.

"It would be misguided to exclude any use of public money in future," added Veron.

Bail-in considerations had to take into account the lack of senior bondholders in Cyprus. In the Greek case, they reflected the fact that money in unsecured deposits belongs to small companies who need it to pay staff and keep the economy moving.

This points to governments making use in future of discretion they have under BRRD to exempt stakeholders from being bailed-in if needed to preserve financial stability.

Karel Lannoo, chief executive of the Centre for European Policy Studies in Brussels, said rescues of small banks will be "book-keeping" exercises in line with BRRD rules in the main.

But the financial stability get-out clause would almost certainly be invoked when it comes to handling very big banks whose failure have far-reaching international consequences, Lannoo said.

"Large banks clearly have financial stability implications and you may have fire sales everywhere with everybody dumping bank debt on the market," Lannoo added.

MINIMIZING THE COST

Applying the rules in differing ways risks causing more uncertainty for investors being asked to buy bonds in banks which could be written down.

The International Capital Market Association, which represents the bond market, warned last month that bail-in complexity may "ultimately impact investor demand and investor behavior, and thereby render bank capital uninvestable"

Lawyers said that some bank rescues will come down to minimizing the overall economic cost to taxpayers rather than trying to avoid any immediate impact.

David Ereira, a banking partner at Linklaters law firm, said there is scope for bank rescues to be conducted on a case-by-case basis rather than rigidly applying the BRRD rules each time to avoid widespread contagion or serious disturbance to the economy.

"If you want to minimize the cost to taxpayers, you need to be looking at the broader economic picture rather than saying we need to automatically apply the rules every time," Ereira said.

"The whole point of bank resolution is preserving key financial services for the benefit of the broader economy."

(Reporting by Huw Jones; Editing by Keith Weir)

By Huw Jones