Alan Frost, a managing director in Mr. Cassano’s unit, negotiated scores of mortgage deals around Wall Street that included a complicated sequence of events for when an insurance payment on a distressed asset came due.

The terms, described by several A.I.G. trading partners, stated that A.I.G. would post payments under two or three circumstances: if mortgage bonds were downgraded, if they were deemed to have lost value, or if A.I.G.’s own credit rating was downgraded. If all of those things happened, A.I.G. would have to make even larger payments.

Mr. Frost referred questions to his lawyer, who declined to comment.

Traders loved Mr. Frost’s deals because they would pay out quickly if anything went wrong. Mr. Frost cut many of his deals with two Goldman traders, Jonathan Egol and Ram Sundaram, who had negative views of the housing market. They had made A.I.G. a central part of some of their trading strategies.

Mr. Egol structured a group of deals — known as Abacus — so that Goldman could benefit from a housing collapse. Many of them were actually packages of A.I.G. insurance written against mortgage bonds, indicating that Mr. Egol and Goldman believed that A.I.G. would have to make large payments if the housing market ran aground. About $5.5 billion of Mr. Egol’s deals still sat on A.I.G.’s books when the insurer was bailed out.

“Al probably did not know it, but he was working with the bears of Goldman,” a former Goldman salesman, who requested anonymity so he would not jeopardize his business relationships, said of Mr. Frost. “He was signing A.I.G. up to insure trades made by people with really very negative views” of the housing market.

Mr. Sundaram’s trades represented another large part of Goldman’s business with A.I.G. According to five former Goldman employees, Mr. Sundaram used financing from other banks like Société Générale and Calyon to purchase less risky mortgage securities from competitors like Merrill Lynch and then insure the assets with A.I.G. — helping fatten the mortgage pipeline that would prove so harmful to Wall Street, investors and taxpayers. In October 2008, just after A.I.G. collapsed, Goldman made Mr. Sundaram a partner.

Through Société Générale, Goldman was also able to buy more insurance on mortgage securities from A.I.G., according to a former A.I.G. executive with direct knowledge of the deals. A spokesman for Société Générale declined to comment.