The U.S. Treasury department attacked S&P’s decision to downgrade the country’s AAA rating, saying that there is a $2 trillion error in the credit rating agency's analysis.

"A judgment flawed by a $2 trillion error speaks for itself," a Treasury spokesman said to FOX News Channel.

S&P said Friday it had lowered the long-term U.S. credit rating to AA+ from AAA, saying that in its opinion, a recently passed deficit cutting plan by the U.S. government fell short of the goal of stabilizing the government's medium-term debt dynamics.

The outlook on the long-term rating was also listed as negative and the rating could fall further.

"We could lower the long-term rating to "AA" within the next two years if we see that less reduction in spending than agreed to, higher interest rates, or new fiscal pressures during the period result in a higher general government debt trajectory than we currently assume in our base case," the report stated.

Last week, President Obama and Congressional leaders reached a deal to raise the federal debt ceiling in an effort to avoid the first U.S. default. The agreement led to votes that averted the default by an Aug. 2 deadline.