0659 GMT February 25, 2020
The referendum, which is due to take place before the end of 2017, "represents a risk to growth prospects for Britain's financial services and export sectors, as well as the wider economy," the agency said in a statement, AP reported.
It also said that economic policymaking "could be at risk of being more exposed to party politics than we had previously anticipated, similar to the situation in the US when we lowered that sovereign rating in 2011."
As a result, S&P has put the outlook on Britain's AAA rating on negative. That basically means that there's a 1 in 3 chance of a downgrade within two years.
The recently elected Conservative government is to hold a referendum on Britain's EU membership by the end of 2017 after a renegotiation process where it hopes to win concessions from its partners including limits to the welfare benefits EU migrants can claim.
Prime Minister David Cameron only has a slender majority in the House of Commons and has to tread carefully in the run-up to the referendum as many in his Conservative Party are likely to vote for a withdrawal. Outside of Parliament, he will also be facing a concerted campaign for exit from the UK Independence Party, which won around 12.5 percent of the vote in the recent election but only gained one seat.
The EU has been a source of contention in Britain for years with many in the country blaming it for high levels of immigration, economic stagnation and low levels of pay. Others think that it is a source of great benefit, not least because membership offers access to the world's most lucrative single market.
Opinion polls suggest that Britain will vote to remain a member regardless of what Cameron manages to negotiate. Still, the recent referendum on Scottish independence and the surprise election victory for the Conservatives shows how opinion polls can change — or just be plain wrong.
S&P is in no doubt about what Britain should do in the referendum.
"The UK benefits from its flexible open economy, which we judge to have prospered inside the EU," it said.