Goldman Sachs Group Inc said it did not intentionally bet against securities in the mortgage market during the financial crisis, dismissing suggestions that it unfairly made money by placing bets against its clients.

As a market maker, we execute a variety of transactions with clients and other market participants ... which may result in long or short risk exposures to thousands of different instruments at any given time, Goldman said in an annual letter to its shareholders.

Goldman said it did not generate enormous net revenue or profit by betting against residential mortgage-related products.

However, following its decision to reduce its exposure to risky mortgage securities, the bank said it lost less money than it otherwise would have when the residential housing market began to deteriorate rapidly.

In January, Goldman Chief Executive Lloyd Blankfein faced harsh questioning from the chairman of the Financial Crisis Inquiry Commission, who accused Goldman of knowingly creating shoddy subprime-backed securities for customers, and then betting they would default.

In the letter to shareholders, Goldman also defended its relationship with the bailed out U.S. insurer AIG and said the bank bought protection on super-senior collateralized debt obligation (CDO) risk only as part of a trading relationship.

This protection was designed to hedge equivalent transactions executed with clients taking the other side of the same trades. In so doing, we served as an intermediary in assisting our clients to express a defined view on the market, Goldman said.

Many banks, including Goldman, were among the recipients of tens of billions of federal bailout dollars that were funneled through the insurer at the height of the crisis, saving them from potential losses and causing a public uproar.

The bank said its total exposure on the securities on which it bought protection was roughly $10 billion and it held about $7.5 billion in collateral from AIG. The remainder was covered through other hedges entered with various counterparties.

If AIG had failed, we would have had the collateral from AIG and the proceeds from the Credit Default Swap (CDS) protection we purchased.

Therefore, we would not have incurred any material economic loss, Goldman said.

(Reporting by Sakthi Prasad in Bangalore; Editing by Jon Loades-Carter)