LONDON (Reuters) - Banks in Britain are being advised they may be able to sue the European Union if it fails to grant them a staggered departure from the trading bloc using rights from an arcane treaty that usually governs international law.

The advice was given in a document drawn up by some of Britain's largest law firms for banks lobbying to retain so-called passporting rights that allow them to operate across all the EU out of their London bases.

The document says there are a number of laws giving them rights for a deal, including the Vienna Convention on the Law of Treaties, that gives them "acquired rights" under a treaty that cannot be suddenly withdrawn.

"EU law cites a number of different bases for requiring transitional arrangements," the document says. "A failure to do so could possibly create an entitlement for an affected EU firm... to take action against the commission."

Finance companies are pressing Britain and the EU to agree to a transition deal that would keep many of the current arrangements for up to five years to help cushion them from the effects of Brexit.

The issue of a transitional deal has emerged a potential flashpoint in Britain's plans to leave the EU. While some members of the British government and businesses are backing the demands for a deal, some European countries such as Luxembourg have ruled out an agreement.

The Bank of England has warned that an abrupt departure could undermine financial stability, but how a bridging deal could work in practice remains a technical and political challenge.

There is no indication yet that banks are considering using the law to challenge the EU. Other lawyers say it would have limited chances of succeeding.

However, the fact that banks and lawyers are exploring these options shows the work they are doing to find work arounds, mainly to buy time before they decide if they will move some operations from Britain to the continent.

VIENNA CONVENTION

The banks may be able to appeal to the European Court of Justice to ensure that they can continue trading in the single market based on one of the four principles of EU law, which is "legal certainty", according to lawyers.

Another key principle of EU law that can be used to demand a transitional deal is that companies have "legitimate expectations" of a stable regulatory environment, the document says.

"EU firms utilizing their passport rights do have 'legitimate expectations' within the meaning of EU law that their rights will not simply disappear on Brexit," the document said. "They will have structured their businesses, and invested into them, in light of those rights."

The document points to precedent when the Belgium government sued the European Commission in 2003 after it ruled that it would have to stop tax concessions given to companies on the grounds it was an unfair form of state aid.

The European Court of Justice struck down the decision three years later saying that the ruling was unjust because companies had made substantial investments into businesses and made long-term commitments on the basis of the concessions.

The commission had failed to couple the repeal of the tax rules with transitional measures.

The Vienna Convention states that rights given under a treaty continue, even after the treaty has been withdrawn.

But faith placed in the Vienna Convention to protect people's acquired rights may well be misplaced, and such rights would in any case need to be confirmed in Britain's divorce deal with the EU to hold water, said Sionaidh Douglas-Scott, a professor of law at Queen Mary University of London.

Barney Reynolds, a partner at Shearman & Sterling, a lawfirm advising banks on Brexit, also cast doubt on the practicalities of relying on the convention.

"Whilst it is possible that such an analysis would be upheld, it is by no means straightforward," Reynolds said.

EU officials involved in preparations for the Brexit negotiations said they have been looking into the implications of the Vienna Convention and its provisions for acquired rights.

The officials believe the convention applies to states, rather than to companies or individuals. "With regards to acquired rights under the Vienna Convention, it's simply not as clear as all that," one source said.

The document was drawn up by three of Britain's biggest law firms - Linklaters, Freshfields and Clifford Chance. All the law firms declined to comment.

Bernardine Adkins, head of EU, trade and competition at Gowling WLG, said it was unlikely that companies would be able to use it because Article 50 provides a legal framework for withdrawal of the treaty that override those laws.

"It is one of these clever weasel arguments people come up with. I don't think it holds water," she said.