Goldman Sachs Group Inc. (NYSE:GS) has purchased mortgage bonds valued at $6.2 billion from the Federal Reserve Bank of New York. The bonds were previously owned by the insurance giant American International Group Inc. (NYSE:AIG), until its government bailout in 2008.

Goldman beat four other banks in an auction for the bonds, held by an entity oin at Maiden Lane II. The closing price wasn't disclosed, but proceeds will go to pay back a $19.5 billion loan for the bonds.

“I am pleased with the continued interest in these assets and am especially gratified that the New York Fed’s loan to ML II will be repaid as a result of the sale announced today,” New York Fed President William Dudley said in the statement.

Some of the securities are backed by subprime loans. AIG had previous offered to buy the bonds last year, but the Fed declined the offer and sought to auction them.

Credit Suisse purchased $7 billion of the bonds in January and sold them to other investors. It also made an unsolicited offer for the $6.2 billion in bonds, which Goldman eventually acquired.

The rest of the securities, which total around $6 billion, will be sold as market conditions warrant, with no set schedule, the Fed said.