(Reuters) - Standard & Poor’s said on Tuesday the U.S. government filed a $5 billion fraud lawsuit against it in “retaliation” for its 2011 decision to strip the country of its “AAA” credit rating.

A view shows the Standard & Poor's building in New York's financial district February 5, 2013. REUTERS/Brendan McDermid

The McGraw Hill Financial Inc MHFI.N unit was the only major credit rating agency to take away the United States' top rating, and the only one sued by the U.S. Department of Justice for allegedly misleading banks and credit unions about the credibility of its ratings prior to the 2008 financial crisis.

In a filing with the U.S. District Court in Santa Ana, California, S&P said the lawsuit filed on February 4 attempts to punish it for exercising its First Amendment free speech rights under the U.S. Constitution, but also seeks “excessive fines” in violation of the Eighth Amendment.

It said the government’s “impermissibly selective, punitive and meritless” lawsuit was brought “in retaliation for defendants’ exercise of their free speech rights with respect to the creditworthiness of the United States of America.”

S&P seeks to dismiss the lawsuit with prejudice, meaning it cannot be brought again. The August 2011 downgrade of the U.S. credit rating to “AA-plus” from “AAA” reflected concern about Washington’s ability to address the nation’s swelling debt.

A Justice Department spokeswoman declined to comment.

On February 5, Associate Attorney General Tony West, who then held that role in an acting capacity, said there was “no connection” between the downgrade and the filing of the lawsuit. The government said its investigation began in November 2009.

In its lawsuit, the government accused S&P of inflating ratings to win more fees from issuers, and failing to downgrade collateralized debt obligations despite knowing they were backed by deteriorating residential mortgage-backed securities.

In Tuesday's filing, S&P estimated that more than $4.6 billion of the alleged losses may have resulted from CDOs that were structured, marketed or sold by Bank of America Corp BAC.N or Citigroup Inc C.N. It also said more than $1 billion came from debt that was never issued in the first place.

S&P also said the government lacked authority to sue under the Financial Institutions Reform, Recovery and Enforcement Act of 1989, because no federally insured financial institutions were affected by violations.

The government has in recent months made more use of FIRREA, which was passed after the 1980s savings and loan crisis, in part because of its lower burden of proof and longer statute of limitations than other laws.

S&P has said its own statements about the independence and objectivity of its ratings were “puffery” that could not be taken at face value.

On July 16, U.S. District Judge David Carter called that proposition “deeply and unavoidably troubling,” in a decision denying S&P’s bid to dismiss the government’s case.

S&P is separately trying to dismiss similar lawsuits by 15 U.S. states now pending in the U.S. District Court in Manhattan. The states want these cases moved to state courts.

The case is U.S. v. McGraw-Hill Cos et al, U.S. District Court, Central District of California, No. 13-00779.