Standard & Poor's is warning that it may downgrade its credit rating on Britain sometime in the next two years following the government's decision to hold a referendum on the country's membership of the European Union.

In a statement, the agency said Friday 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 U.S. 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.