Image copyright Getty Images

The ratings agency Standard and Poor's (S&P) has cut its outlook for the UK economy because of a planned referendum on EU membership.

The referendum "represents a risk to growth prospects" for the country's economy, S&P said in a statement.

S&P changed its outlook to negative from stable but kept its current rating on the UK the same.

Prime Minister David Cameron has promised an in-out referendum on the UK's membership in the EU by 2017.

Responding to the move, the Treasury said: "We are the first to say that this is a time of heightened risk that threatens the recovery, which is why we need to go on working through the plan that is delivering economic security.

"Central to that plan is giving the British people their first say on our EU membership in forty years and resolving the uncertainty around Britain's relationship with the EU," it added.

'Party politics'

However, S&P warned that it wasn't just the referendum that was causing concern.

"We believe a possible UK departure from the EU also raises questions about the financing of the UK's large twin deficits and its high private short-term external debt," it added.

Image copyright Getty Images Image caption S&P warned that the City's financial services could be adversely affected by the EU referendum

Furthermore, S&P cautioned that a lack of political consensus could affect UK economic policy in the future.

"It is also our view that the calling of a referendum on EU membership indicates that economic policymaking could be at risk of being more exposed to party politics than we had previously anticipated," it continued.

A lower credit rating makes it more expensive for a country to borrow money. A negative outlook means a one-in-three chance of a downgrade in the next two years.

S&P is the only major ratings agency to still give the UK a top rating of AAA, because it views the UK economy as flexible and diversified.

The other two, Moody's and Fitch, both downgraded the UK in 2013 over worries about its economic growth and the country's ability to repay its debt.

Earlier this week, the independent watchdog the Office of Budget Responsibility warned that years more spending cuts would be needed in order to bring the national debt under control.