In the civil fraud case against the bond-rating firm filed late Monday in Los Angeles, the government claims a “desire for increased revenue and market share” led S&P to “downplay and disregard the true extent of the credit risks” to “favor the interests of the large investment banks” and other issuers of mortgage bonds.

Like many cases stemming from the financial crisis, government investigators relied on records of emails and instant messages to help tell the story.

In April 2007, two analysts exchanged instant messages about S&P's willingness to rate mortgage bonds despite the possibility that the firm's rating model was underestimating growing risk in the home-loan market.

“We rate every deal,” one analyst said to another. “It could be structured by cows and we would rate it.”

By 2007, some inside S&P had been sounding the alarm over the subprime mortgage market. But the government says the company ignored its own analysis and “lulled the public into believing that its CDO ratings fully accounted for the existing and anticipated deterioration” of subprime mortgage bonds and securities known as collateralized debt obligations.

In a July 2007 email to an investment banking colleague, an S&P analyst wrote:

“The fact is, there was a lot of internal pressure in S&P to downgrade lots of deals earlier on before this thing started blowing up. But the leadership was concerned of p*ssing off too many clients and jumping the gun ahead of Fitch and Moody's.”

The investment banker replied: “This might shake out a completely different way of doing biz in the industry. I mean, come on, we pay you to rate our deals, and the better the rating the more money we make?!?! Whats up with that? How are you possibly supposed to be impartial????”

The better that S&P rated these securities, the less credit protection the firms issuing the securities would need, making them more profitable and translating into more business for S&P.

The suit cites Western Federal Corporate Credit Union, a San Dimas-based institution seized by regulators in March 2009 after incurring nearly $7 billion in losses from mortgage-backed securities. S&P stands accused of defrauding investors such as WesCorp., as the credit union was known.

S&P said Monday it would vigorously defend itself against the suit. The firm's attorney, superstar First Amendment lawyer Floyd Abrams, told CNBC Tuesday morning: “There was no fraud.”

The government claims that despite S&P's repeated claims that it provided independent analysis free of conflicts the credit rater nonetheless issued favorable ratings to its biggest customers – regardless of the bonds' underlying problems.

At one meeting in 2004, S&P executives met to discuss changing its process for assigning ratings. The proposed changes called for including “market insights,” “rating implications,” and polling a few investors but also investment banks and other firms packaging the securities.

One S&P official objected, but his colleagues ignored his concerns and changed the process anyway, according to the suit.

The suit alleges that S&P delayed updates to its ratings criteria and to its analytical models so that they would not be as accurate as S&P analysts believed they should have been.

S&P received negative feedback from Bear Stearns, the ill-fated investment bank eventually rescued by the federal government, and JPMorgan Chase & Co, according to the suit.

As the mortgage bubble was inflating, S&P saw increased competition from other rating firms, according to the suit.

At one point in 2004, an S&P analyst complained via email that the firm's more conservative rating criteria were hurting the bottom line.

“Losing one or even seven deals due to criteria issues, but this is so significant that it could have an impact on future deals,” the analyst wrote, according to the suit.

The government is pursuing its claims under the Financial Institutions Reform, Recovery and Enforcement Act, enacted after the savings and loan scandal of the late 1980s and early 1990s. The suits seeks civil damages for alleged mail and wire fraud and financial institution fraud. The law allows for a $1.1-million fine for each violation.

Abrams, in the CNBC interview, said S&P would not be making a First Amendment defense, which is how debt-rating firms have deflected such claims in the past.

The Justice Department was expected to formally announce the S&P case Tuesday at a news conference in Washington.