The outcome: the agency affirmed the decision the committee had made just that morning, yanking its triple-A rating from the United States and downgrading it one notch to AA+.

The error and the time the ratings agency took to reconsider its downgrade are among the controversies surrounding the ultimate decision to downgrade the United States, which has held the agency’s top triple-A rating since 1941.

Also at issue is whether the new data shows the US eventually meeting the S&P’s criteria of a sustainable deficit level and whether the agency should have included state and local government debt in its rating of US sovereign debt. Neither side provided the data Friday evening that was at issue.

What is not at issue is that sometime in the early afternoon Friday, S&P informed the US Treasury that its committee had decided to downgrade US sovereign debt. Ratings agencies typically inform issuers of their decision before a press release is issued. But US officials quickly noticed an error in the agency’s calculations. This resulted in a change in the projected debt to GDP ratio. Instead of the 87 percent in 2021 miscalculated by S&P, it should have been 79 percent, a roughly $2 trillion mistake.

Neither side disputes the error.

But there are different versions of how long S&P then took after learning of its mistake to reconsider its downgrade. One source familiar with thinking inside the government says officials were stunned when S&P returned just an hour or two later and told them they were going ahead with the downgrade despite the mistake. The source says this suggested the agency was committed to the downgrade regardless of the data. The source adds that the new data showed the US achieving a sustainable deficit in the ten-year window.

Yet, a person familiar with the thinking in S&P said the agency took considerably more time and carefully considered the new information. It went to great lengths to convene its entire committee and consider the matter. This person says the conclusion was the same: while the rate of the growth in debt slowed and was lower than first calculated, it never stopped growing and became sustainable, the criteria by which S&P had said last month it would judge the US. It had said it was looking for $4 trillion of cuts but the debt ceiling deal produced only about $2.7 trillion.

S&P did not release data with its press release on Friday. But Amid the controversy, it put out a statement after midnight saying that it's primary focus in judging creditworthiness is 3 to 5 years, not 10 years.

In that time frame, the error only added 2 percentage points to the debt to GDP tatio, or about $350 billion. "The primary focus remained on the current level of debt, the trajectory of debt as a share of the economy, and the lack of apparent willingness of elected officials as a group to deal with the U.S. medium term fiscal outlook," the statement said. "None of these key factors was meaningfully affected by the assumption revisions ..."

What the data will show is that S&P’s review of the United State sovereign debt includes state and local debt. This is commonplace around the world because in many countries local debt is centralized through the national government. But government sources say this is not the case in the US because state and local municipalities have their own political and taxing authority to raise debt. No deal in Washington can change the amount of state and local debt issued or retired.

S&P contends that it’s appropriate when judging the creditworthiness of a country to include all the government debt since its all paid by the same taxpayers. Still, it acknowledges that its methodology means an additional 1 percentage point of debt to GDP when compared to calculating just the Federal government alone.

S&P says it had ample time to consider the situation, even though a deal to raise the debt ceiling was only struck on Tuesday. Sources familiar with the matter say Treasury officials wonder what the rush was and question whether the ratings agency had sufficient time to crunch the data. They suggested the error made by the agency shows it did not.