The major credit-rating agencies are supposed to be private-sector watchdogs of the financial world.

They bark when cities, states and countries go too deep into debt. They howl when Greece conceals its true indebtedness, for instance, or when the state of Illinois' unfunded pension obligations grow dangerously large.

They evaluate companies, too, for creditworthiness. In a sentence: They rate securities based on the ability to pay back the money, and the agreed-upon interest, that governments and businesses borrow from investors.

The AAA rating has entered the vernacular as a synonym for the best: blue chip, No. 1, triple-A.

During the real-estate meltdown, though, Americans found out the hard way that AAA meant less than widely supposed. Standard & Poor's, Fitch Ratings and Moody's Investors Services assigned much higher ratings to mortgage-backed securities than the investments deserved.

When the housing market crashed, those securities plunged in value. They turned out to be far more risky than their ratings indicated: Too many of the underlying mortgages had gone to homeowners unable to keep up with their monthly payments.

Nearly every American lost money as a result, because pension funds, banks and other companies that had put their funds into these supposedly safe assets instead were left with huge losses that helped to sink the economy.

On Tuesday, U.S. Attorney General Eric Holder, flanked by Lisa Madigan of Illinois and several other state attorneys general, announced the Justice Department's long-expected civil fraud suit against S&P. Sixteen states and the District of Columbia also are suing S&P.

The allegations are familiar: The lawsuit alleges that Wall Street financial engineers who created mortgage-backed securities during the real-estate boom in 2004-07 paid huge fees to S&P and, in return, S&P issued inflated ratings on subprime securities.

By pocketing the money when it knew the ratings were unjustified, the suit alleges, S&P committed a fraud on the public: S&P's "desire for increased revenue and market share" prompted it to "downplay and disregard the true extent of the credit risks." The plaintiffs seek $5 billion in penalties.

S&P, a unit of the McGraw-Hill Cos., has long faced criticism from investors for the poor job that it and its competitors did in assessing mortgage-backed securities. But the allegation here isn't that S&P made mistakes, rather that it acted with intentional deceit.

That's a grave allegation -- and could be difficult for the government to prove. S&P on Tuesday said it acted in good faith when it issued its ratings and, like other rating agencies and governmental bodies, didn't anticipate the real-estate collapse. S&P pledged to "vigorously defend" itself against "unwarranted claims" in the government's 128-page lawsuit.

There is evidence that the company has recommitted itself in recent years to doing tough-minded analysis. Despite its lapses during the real-estate boom and bust, S&P remains a trusted arbiter from Wall Street to Main Street: Its downgrades and upgrades move stock and bond prices -- as when it downgraded the U.S. government's AAA rating in August 2011.

That still-unreversed downgrade, a persistent embarrassment to the Obama administration, raises questions about whether the Justice Department's decision to sue only S&P is politically motivated.

Why not sue smaller rivals Moody's and Fitch as well? Their performance during the real-estate bust was similar to S&P's. All three agencies made glaring mistakes, and presumably faced the same conflicts of interest -- rating securities packaged by paying customers -- that are alleged in the lawsuit.

Litigation strategy may be part of the answer: The Justice Department filed its suit in Los Angeles, and focused on a relative handful of securities that cost California's public pensions a reported $1 billion in losses.

A spokesman for Illinois' Madigan said that suing only S&P made sense because, "S&P is the largest of the three, and we haven't closed the door on additional enforcement efforts." New York's attorney general is continuing a separate investigation.

S&P reportedly was conducting settlement talks with the Justice Department until recently, balking at the requirement that it pay a $1 billion civil penalty and admit wrongdoing -- an outcome that would open it to additional lawsuits, but also would allow politicians who've demanded prosecution of rating agencies to boast of defeating S&P. Now the government has to prove its case.

Targeting the one agency that slashed the credit rating of the U.S. government invites allegations that this lawsuit is political payback. Floyd Abrams, the high-profile attorney representing S&P, accused the Justice Department of intensifying its investigation of the firm after it downgraded the United States, although Abrams also said he doesn't know why. The rest of us are left to wonder, too.

The government's effort to crack down on this sad chapter in financial history is overdue and warranted. As this case proceeds through the courts, the goal should be restoring confidence in a part of the financial system that failed during the real-estate meltdown, while also retaining confidence that Justice fairly administers justice.