Goldman Sachs Group Inc officials boasted in late 2007 about the money the investment bank was making from betting against risky mortgages, according to a collection of e-mails released by a Senate panel on Saturday.

The emails were released ahead of a hearing on Tuesday by the Senate Permanent Subcommittee on Investigations into the origins of the financial crisis and as the bank battles a fraud suit by the Securities and Exchange Commission.

Of course we didn't dodge the mortgage mess. We lost money, then made more than we lost because of shorts, Goldman Sachs Chief Executive Lloyd Blankfein said in an e-mail dating from November 2007.

Sounds like we will make some serious money, said Goldman Sachs executive Donald Mullen in a separate series of e-mails from October 2007 about the performance of deteriorating second-lien positions in a collateralized debt obligation, or CDO.

The subcommittee due to hear from Blankfein and other Goldman executives about the role of investment banks in the financial crisis.

Commenting on the emails, Senator Carl Levin, chairman of the subcommittee, said that they showed Goldman made a lot of money by betting against the mortgage market.

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 in a statement.

Lucas van Praag, a spokesman for Goldman, said that Levin's subcommittee had cherry-picked just four e-mails from almost 20 million pages of documents and e-mails provided to it by Goldman Sachs. It is concerning that the Subcommittee seems to have reached its conclusion even before holding a hearing.

Van Praag said that Goldman's profit and loss statements for 2007 and 2008 demonstrated conclusively that the firm did not make a significant amount of money in the mortgage market.

What it does show, he said, is that we had net losses of over $1.2 billion in residential mortgage-related products in the period. As a firm, we obviously could not have been significantly net short since we lost money in a declining housing market.

(Reporting by Dan Margolies and Karey Wutkowski; Editing by Tim Dobbyn)