NEW YORK (Reuters) - The U.S. Securities and Exchange Commission is accusing Goldman Sachs Group Inc of committing fraud in a complicated transaction involving securities known as collateralized debt obligations.

The particular deal that Goldman entered into with Paulson and others was called ABACUS 2007-AC1.

Here’s how the deal worked, according to the SEC’s complaint:

1) Hedge fund manager John Paulson tells Goldman Sachs in late 2006 he wants to bet against risky subprime mortgages using derivatives. The risky mortgage bonds that Paulson wanted to short were essentially subprime home loans that had been repackaged into bonds. The bonds were rated “BBB,” meaning that as the home loans defaulted, these bonds would be among the first to feel the pain.

2) Goldman Sachs knows that German bank IKB would potentially buy the exposure that Paulson was looking to short. But IKB would only do so if the mortgage securities were selected by an outsider.

3) Goldman Sachs knows that not every asset manager would be willing to work with Paulson, according to the complaint. In January 2007, Goldman approaches ACA Management LLC, a unit of a bond insurer.

ACA agrees to be the manager in a deal, and to help select the securities for the deal with Paulson. In January and February 2007, Paulson and ACA work on the portfolio, coming to an agreement in late February.

Goldman never tells ACA or other investors that Paulson is shorting the securities, and ACA believes that Paulson in fact wanted to own some of the riskiest parts of the securities, according to the complaint.

4) Goldman puts together a deal known as a “synthetic collateralized debt obligation” designed to help IKB and Paulson get the exposure they want. IKB takes $150 million of the risk from subprime mortgage bonds in late April 2007. ABN Amro takes some $909 million of exposure as well, and buys protection on its exposure from ACA Management affiliate ACA Financial Guaranty Corp in May 2007.

Goldman’s marketing materials for the deal never mention Paulson’s having shorted more than $1 billion of securities. Goldman receives about $15 million in fees.

5) Months later, IKB loses almost all of its $150 million investment. In late 2007, ABN is acquired by a consortium of banks including Royal Bank of Scotland. In August 2008, RBS unwinds ABN’s position in ABACUS by paying Goldman $840.1 million. Most of that money goes to Paulson, who made about $1 billion total.