While banks and homeowners struggled as the housing bubble burst in the second half of 2007, Goldman Sachs was making “serious money” from betting against the mortgage market, startling new e-mails show.

The e-mails, released yesterday by the US Senate Permanent Subcommittee on Investigations, show how Goldman executives boasted about their short positions on mortgages — often bets again their own investments — and how much money they made from it.

Even chief executive Lloyd Blankfein admitted as much in a Nov. 18, 2007, e-mail to colleagues, saying, “Of course we didn’t dodge the mortgage mess. We lost money, then made more than we lost because of the shorts.”

The explosive e-mails were released ahead of hearings on Wall Street and the financial crisis that are expected to convene Tuesday. The e-mails, in part, show how Goldman higher-ups cheered the collapsing housing market because the firm placed huge bets that housing prices would fall and that thousands of homeowners would default on their mortgages.

On April 16, the Securities and Exchange Commission charged Goldman with fraud for failing to tell one client it sold a mortgage-related security in January 2007 that was based on toxic mortgages that were chosen, in large part, by a bearish hedge fund manager.

Goldman, which is maintaining its innocence, claims its loss of $100 million on a long position in the same deal, called Abacus, proves it believed in the mortgages related to synthetic collateralized debt obligations.

But six months after the ill-fated Abacus deal, David Viniar, Goldman’s chief financial officer, appears to be proud of the firm’s many other short positions. In another e-mail, Viniar tells Chief Operating Officer Gary Cohn, after a published report showed that Goldman netted more than $50 million a day by shorting the housing bubble: “Tells you what might be happening to people who don’t have the big short.”

By October, the $100 million loss appeared to be well overcome.

In an Oct. 11 e-mail, Goldman exec Michael Swenson tells another colleague, Donald Mullen, that several mortgage securities have been downgraded by Moody’s Investors Service and that as a result, Goldman will owe some investors nothing.

Mullen responded, “Sounds like we will make some serious money,” to which Swenson replied, “Yes we are well positioned.”

The e-mail exchanges are sure to spark more rage at the gold-plated firm, which has gotten beaten up the past 18 months for outperforming its rivals.

In response to the e-mails, Goldman released profit and loss information for each quarter of 2007 and 2008 which it said show that the bank didn’t make a significant amount of money in the mortgage market.

Said Goldman: “In its statement, the US Senate subcommittee has cherry-picked just four e-mails from the almost 20 million pages of documents and e-mails provided to it by Goldman Sachs. . . . The subcommittee seems to have reached its conclusion even before holding a hearing.”

Yesterday, Sen. Carl Levin (D-Mich.), chairman of the Permanent Subcommittee on Investigations, had some choice words for Goldman when he released the e-mails ahead of Tuesday’s hearing.

“Investment banks such as Goldman Sachs were not simply market-makers, they were self-interested promoters of risky and complicated financial schemes that helped trigger the crisis,” Levin said.

‘We’ll make serious money’

A Senate panel released four e-mails yesterday related to Goldman Sachs. The subcommittee will hold hearings on Tuesday and Goldman CEO Lloyd Blankfein and Chief Financial Officer David Viniar are scheduled to testify.

From: Lloyd Blankfein

To: Other Goldman executives

Sent: Sunday, Nov. 18, 2007

Of course we didn’t dodge the mortgage mess. We lost money, then made more than we lost because of shorts.

After a report on Goldman’s trading activities is released, showing that in just one day, Goldman netted over $50 million by taking short positions that increased in value as the mortgage market collapsed:

From: David Viniar

To: Gary Cohn (Goldman chief operating officer)

Sent: Sunday, Nov. 18, 2007

Tells you what might be happening to people who don’t have the big short.

After credit agencies downgraded $32 billion in mortgage-related securities, causing loses for many investors, two Goldman employees exchanged e-mails about how they had bet against the market:

From: Donald Mullen

To: Michael Swenson

Sent: Thursday, Oct. 11, 2007

Sounds like we will make some serious money.

From: Michael Swenson

To: Donald Mullen

Yes we are well positioned.

Two Goldman employees discuss the ups and downs of securities that were underwritten and sold by Goldman and tied to mortgages issued by Washington Mutual Bank’s subprime lender, Long Beach Mortgage Company. Reporting the “wipeout” of one Long Beach security and the “imminent” collapse of another as “bad news” that would cost the firm $2.5 million, a Goldman Sachs employee then noted: