The Government has lost a legal challenge against plans for a European tax that experts fear could hit the City of London.

Although the UK has not signed up to the financial transaction tax (FTT), ministers challenged the policy because the levy imposed on transactions could affect City deals.

The European Court of Justice (ECJ) ruled that the UK's challenge was premature because detailed plans to implement the FTT had not yet been put in place.

A Treasury spokesman said: "Today's decision confirms the UK will be able to challenge the final proposal for a Financial Transaction Tax if it is not in our national interest and undermines the integrity of the single market. We risked not being able to do that if we had not made this challenge now.

"The Government is determined to continue to ensure that the interests of countries outside of the single currency but inside the single market are properly protected as the euro area continues to integrate, including with any proposal for a Financial Transactions Tax."

The Government challenged the decision allowing "enhanced co-operation" between 11 countries in favour of setting up the FTT.

But the ECJ ruled that "the contested decision does no more than authorise the establishment of enhanced co-operation, but does not contain any substantive element on the FTT itself" and "the elements of a future FTT challenged by the United Kingdom are in no way constituent elements of the contested decision".

"That being the case, the Court considers that the two arguments put forward by the United Kingdom are directed at elements of a potential FTT and not at the authorisation to establish enhanced cooperation, and consequently those arguments must be rejected and the action must be dismissed."

Syed Kamall, leader of Tory MEPs, said: "This is grave news and further justification for our campaign for the three Rs in Europe - reform, renegotiation and an in-out referendum.

"It is clear that the court has rushed to this judgment, without even taking time to receive advice from the advocate general or to hold a public hearing, as is usually the case.

"I believe it calls into question the court's supposed role as a neutral referee. It does not inspire confidence in the court's ability to protect UK interests or the proper working of the single market as the eurozone goes further down its road of integration.

"I sincerely hope the Government will lodge an appeal and that this hasty decision will be overturned once the right level of reflection and rigour is applied."

Last year peers on the House of Lords EU sub-committee accused ministers of being complacent about the threat the tax would pose to the City.

They warned that the imposition of the so-called "Robin Hood tax" could have a "significant detrimental effect" on all member states, whether or not they join up.

Although the Government has always made clear that Britain would not participate, the committee said ministers had been slow to wake up to the implications for the UK of the 11-member group, including France and Germany, going ahead with the FTT.

British financial institutions engaging in transactions with those in the participating member states would be liable to pay the FTT, which would then have to be collected by the UK tax authorities on behalf of the member state, it said.

It warned the tax would be damaging to UK financial markets while London was unlikely to benefit from the relocation of financial activity away from the FTT zone, with the business more likely to go to centres outside the EU altogether, such as New York, Hong Kong or Singapore.

Robin Hood Tax campaign spokesman David Hillman said: "George Osborne has gone to Europe to bat for the bankers, but he's been bowled first ball.

"This futile legal challenge tells you all you need to know about the Government's misguided priorities: it would rather defend a privileged elite in the City than support a tax that could raise billions to tackle poverty and protect public services.

"Instead of trying to stop other countries taxing their financial sectors, our Government should follow their lead, stand up to vested interests and harness the City's excessive wealth for the wider benefit of society.

"Complaining that the City will be hit by a European FTT is a clear case of double standards - almost half of the £3 billion revenue from our own FTT, the stamp duty on shares, comes from non-UK residents."

Unite union general secretary Len McCluskey said: "George Osborne is forcing austerity on the British people so his friends in the City don't have to clean up the financial wreckage they caused.

"It's no surprise that the Government has confirmed that it will challenge the European Court of Justice's decision just as the Government is opposing the EU cap on bankers' bonuses in the courts.

"It's clear proof that this Government will back spivs and speculators at the expense of our schools and hospitals. What should make the people of our country really angry is that this Government will use our taxes to support legal challenges on behalf of the very people who wrecked our economy."

London mayor Boris Johnson said rival financial centres would be "licking their lips" at the prospect of taking trade away from the City.

He said : "This judgment beggars belief. With London's economy buoyant once more and driving the national recovery, the last thing that we need is a barmy tax that will stamp on growth and potentially drive businesses to financial centres outside the EU.

"Finance is a global game and our rivals in the US and Asia will be licking their lips in sheer delight. This ruling also raises serious questions about how the UK can safeguard its financial services sector, given that we are not in the euro.

"The Government has been right to oppose this all along and I am sure they will continue to fight this nonsense still further. We cannot allow jobs, growth and livelihoods to be jeopardised by those in the EU who mistakenly view financial services as an easy target, despite the fact that the industry is crucial to the economic recovery of all its members."

But TUC general secretary Frances O'Grady said: "The Chancellor should never have taken this case and used taxpayers' money to defend City fat cats. It's time the financial sector paid its fair share of the costs of the economic crisis they helped cause.

"A Robin Hood Tax would rebalance the economy away from thinly-disguised gambling with our pensions, and provide the tax revenue needed to defend quality public services like health and education, as well as tackling climate change and global poverty."

Ukip leader Nigel Farage claimed the ECJ ruling exposed David Cameron's plan to negotiate a better deal for Britain in Europe.

He said : "This FTT judgment shows that the UK cannot act to protect the UK's biggest interest. It is impotent and at the mercy of an antagonistic federalist court - the ECJ.

"It shows Cameron's argument that the UK government can negotiate a better deal for British business from within the EU as a fraud and a farce.

"The only way to protect the UK financial interest is to withdraw from the tax-hungry EU and stop giving Brussels power over us.

"It is now clear that financial institutions in member states such as the UK and outside the FTT zone can be taxed.

"This is a deliberate assault on the City of London.

"We now have it in black and white that the European Commission wants to tax financial institutions in the UK even though they are not within the FTT zone.

"The Commission proposal is clearly targeted to tax financial services in the City even though the UK Government does not want to be part of the participating member states.

"The UK Government will have no say on this tax system but businesses within its borders will be burdened by this FTT.

"This tax will help push financial services outside the EU altogether, to Switzerland and other growing financial centres around the globe.

"Mark my words, this taxation is just the beginning because the FTT tax rate will be ratcheted up over the coming years to squeeze more money from the financial services industry.

"In January, the EU court also rejected a UK attempt to prevent Brussels from winning powers to ban short selling. Just how many times does the British financial industry have to be kicked in the teeth by the ECJ before Cameron will shout 'enough is enough'?"