LONDON (Reuters) - Ratings agency Standard & Poor's upgraded its outlook on Britain's top-notch triple-A credit rating to stable from negative on Friday, but said this would be threatened if Britain decided to leave the European Union.
In news that will hearten finance minister George Osborne, S&P said Britain was making good progress in getting its public finances in order.
Osborne's Conservative-led government promised to protect Britain's credit rating when it took power in 2010, but subsequent economic stagnation and rising debt caused Moody's and Fitch to strip Britain of their triple-A ratings last year.
"We anticipate that the UK's economic recovery will continue to broaden, benefiting the public finances," S&P said in a statement.
But S&P warned of consequences if Britain decided to leave the European Union. The Conservatives have pledged to hold a referendum on Britain's membership of the EU in 2017 if they win next year's general election.
"We believe that if the UK were to leave the EU, this would weaken the UK's economic prospects, and be a negative factor for the rating," said S&P, citing likely damage to trade.
S&P also played down concerns about the strength of Britain's housing market upturn, and said it expected future house price rises to be "more contained" with the introduction of macroprudential measures.
Osborne said on Thursday that he would grant the Bank of England new powers to impose maximum loan-to-value and loan-to-income ratios on mortgage lending - a step that BoE Governor Mark Carney welcomed.
S&P, the only major ratings agency to retain a triple-A rating on British sovereign debt, said its outlook upgrade meant there was now a less than one-in-three probability that Britain will lose its top credit rating within the next two years.
Fitch Ratings earlier on Friday affirmed its "AA+" grade for Britain, one notch below its top rating.
(Reporting by Andy Bruce and David Milliken; Editing by Kevin Liffey)