How S&P ‘Burned down the house’

February 6, 2013, 3:00 PM UTC

FORTUNE — In early 2007, a Standard & Poor’s analyst who had just completed an analysis of the firm’s recent ratings of mortgage bonds sent an e-mail to his colleagues with a parody of the Talking Head song Burning Down the House. One line: “Subprime is boi-ling o-ver, Bringing down the house.”

Shortly after, the analyst wrote back asking people not to forward the e-mail, worried it would make him look bad. Instead he offers, “If you’re interested, I can sing it in your cube.” He later made a video.

On Tuesday, the Department of Justice unveiled a civil suit against S&P for its role in the sale of billions of dollars of mortgage bonds that eventually soured in the housing bust. There is a lot in the suit that makes S&P look bad. The complaint is a fascinating look into what it must have been like to work at the center of the mortgage machine.

MORE: Five myths of the great housing meltdown: Part 2

As always, there’s a question of what looks bad, and what’s really bad. S&P, for its part, called the lawsuit from the Justice Department “entirely without factual or legal merit.”

A good portion of the bad behavior appears to be driven by one key decision that the executives at S&P made, and were unwilling to correct, back in 2004. The executives seemed to realize that S&P’s model for rating mortgage bonds was too lenient. So they proposed an upgrade with stricter ratings criteria. They held a meeting and drew up new guidelines. They even signaled to clients that they were going to make the switch. And then nothing. The upgrade was dropped.

One executive who complained about it to his superiors got two responses. First, stop documenting your concerns in e-mails. And second, our analysis suggests that doing the upgrade won’t boost our market share or revenue so we aren’t going to spend money on it, which at least in a business context seems kind of reasonable.

At least at first. But, according to the DOJ, sometime in early 2007, S&P’s faulty rating system morphed from something that could cost them business if it were made stricter to something that was actually creating new business, and bonds, and eventually investor losses, that wouldn’t have normally existed without S&P. And that’s where S&P’s alleged actions cross over from looking bad to actually being bad.

MORE: Alan Sloan: Why everyone getting into stocks makes me nervous

Indeed, the DOJ suit paints S&P as much more of a villain in the housing bust — pumping up the bubble and being directly responsible for billions of dollars of investors losses — than it has been portrayed in the past.

According to the DOJ, in early 2007, S&P suspected that the housing market was going to implode and that there would be millions of defaults and foreclosures. The executives even held a meeting in January 2007 about “the housing bubble,” and what to do about it. The response you would hope for would be to blow the whistle, own up to your mistakes and tell investors to run for cover. But that’s not what S&P did.

According to the DOJ, S&P executives came to the conclusion that Wall Street was going to want out of all those subprime mortgage loans and bonds that the banks had held onto, and that they could make a lot of money helping them.

At one point, in early 2007, S&P’s model — not the new one, but the old, faulty one — indicated that the firm should put 770 mortgage bonds on its credit watch list for possible downgrade. But a move of that size would have caused the mortgage bond market to collapse, and put a stop to this process of repackaging the loans, which at this point was making S&P hundreds of millions of dollars.

MORE: Dell deal is done

So S&P didn’t do it. Instead, just 18 of the bonds S&P’s model flagged as troubled were put on watch for a downgrade. Worse, it continued to issue high ratings on new bonds being created out of the bonds S&P internally determined should have been downgraded. S&P continued to rake in the fees.

The suit notes that when Fortune published an article in 2007, pointing out the damage S&P was doing, the firm’s response was to consider hiring an outside public relations consultant.

In the end, S&P comes off as an active participant in the process of offloading what should have been billions of dollars in losses for Wall Street and mortgage lenders, onto community banks, individual investors and municipalities around the country.

It’s very hard to make a case that S&P shouldn’t be prosecuted for that.