Banks and credit ratings agencies have warned that David Cameron's European Union referendum could hurt the economy and even cause the value of UK assets to tumble.

The Prime Minister confirmed plans to hold a vote on the UK's membership in his acceptance speech on Thursday night.

He defended the idea on democratic grounds, arguing it was right to give the electorate a say.

But critics say the Conservative leader was forced to promise the vote as a sop to rebel Tory backbenchers during the last parliament.

Within hours of the election result a number of large financial institutions issued warmings about what the referendum could mean.

Credit ratings agency Moody's said that a potential UK exit, or 'Brexit', could have consequences "for the whole economy, including potentially for the sovereign rating."

UBS Wealth Management warned: "The proposal for an EU referendum is likely to go ahead in 2017, posing uncertainty about the future role of the UK in the EU and implications for UK companies with cross-border trade, and UK banks, in particular".

The boss of independent financial advisory organisation de Vere Group, Nigel Green, warned investors: "The prospect of an in-out referendum of Britain's EU membership has gone from risk to a reality.

"Since this is likely to take place in several years' time, this could lead to numerous years of ongoing uncertainty - something the markets are allergic to - and, in response, investors need to take precautions against a fall in the value of UK assets.

"They can do this by increasing their exposure to overseas investments."

SNP leader Nicola Sturgeon has called for a "lock" that would prevent the UK leaving the EU unless England, Scotland, Wales and Northern Ireland all independently agreed.

But Mr Cameron has rejected that suggestion.

Earlier this year ex-Lib Dem leader Nick Clegg suggested that a UK exit could trigger Scottish independence.

But others back the idea of a vote on membership.

They argue that the EU requires reform and the vote is the UK's leveraging tool.

The Conservative leader this week again reiterated his stance that he "ruled nothing out" unless the EU agreed to the UK's demands.

One potential stumbling block could be to EU rules on freedom of movement.

Many other European nations consider the principles one of the founding ideas of the union and reject any call for change.

The Tories, however, argue that that principle was always meant to enable those who travel for work not to claim benefits.

Matthew Elliott, from Business for Britain, said: "Thanks to this resounding result, an EU referendum is now a welcome certainty.

"Voters have been clear, they back a referendum - a position shared by both a majority of the business community and a majority of Labour voters.

"The focus in the EU debate must now turn to the renegotiation.

"We need fundamental EU reform and a better deal for Britain, and business groups must assist the Prime Minister in this task, rather than scaremongering about the uncertainty of giving people a say on this crucial issue."

Shares surged as it became apparent that the Conservatives were on course for a majority victory.

HSBC economists Simon Wells and Liz Martins said the European referendum and the SNP's virtual clean-sweep in Scotland were the two big medium-term implications of the result.

"The economic implications of a possible British EU exit could be far-reaching and the BoE [Bank of England] may soon be turning its attention to the regulatory and financial stability implications of such a scenario.

"The huge gains made by the SNP once again call into question the future of the UK itself. If Scotland were to vote to stay in the EU, but the rest of the UK were to opt to leave, pressure to break up the union could increase further."

Andrew Wells, global chief investment officer of Fixed Income at Fidelity Worldwide Investment, said that "on the face of it" the result would be positive for sterling and Government bonds.

"However as the dust settles the change in Scotland will have to be closely followed.

"Whilst the Scottish nationalists did not campaign on a ticket of devolution, the magnitude of support for them must herald change in the future, and this will cause greater uncertainty.

"The other danger is that a slim majority, with no significant coalition could always see us back at the polls in a short period of time and markets will be wary of that situation."