That rating reflects a stable outlook and S&P said it expected the government would keep budgets tight reports The BBC.
Chancellor George Osborne said it was a reminder the world had confidence that Britain was dealing with its debt.
The International Monetary Fund last week said the UK should slow its budget cuts if growth did not recover.
Its annual report on the UK said that tax rises and spending cuts introduced since the spring of 2010 had cut growth by 2.5% over the past two years.
S&P has now said in a statement: “In our view, monetary flexibility remains a key credit strength owing to the British pound sterling’s role as a global reserve currency.
“The stable outlook reflects our expectation that the UK government will implement the bulk of its fiscal consolidation programme and that the economy should recover in the remainder of 2012 and strengthen thereafter.”
The agency said it believed the British economy’s “capacity to absorb shocks” had improved, with an increase in household savings and large corporations’ cash holdings.
Responding to the news, Mr Osborne said: “On the day Britain welcomes the world to our country for the Olympic games, this is a reminder that despite the economic problems we face, the world has confidence that we are dealing with them.
“The deficit has fallen by a quarter; inflation has fallen by half; employment is rising, with British businesses creating over 800,000 new jobs; and the economy is rebalancing, with Britain now exporting more to the rest of the world than Europe.
“And as S&P themselves say, what would damage Britain’s creditworthiness would be relaxing our resolve to deal with our debts. We won’t do that.”