Merrill Lynch agreed to a retirement package with its embattled Chairman and chief executive Stan O'Neal less than a week after the company posted its biggest quarterly loss ever, giving him $161.5 million in stock and benefits, but no bonus for 2007.

Details of the exit package were revealed in a securities filing on Tuesday. Unvested and vested stock units will total $131.4 million. Future retirement related payments will total $24.7 million. Deferred compensation will total $5.4 million.

Taking over as interim non-executive chairman is Merrill board member Alberto Cribiore, who is the managing partner of Brera Capital Partners. Cribiore will be in charge of finding O'Neal's replacement, according to a statement.

We would like to thank Stan for the contribution he has made leading a major transformation of Merrill Lynch into a global and diversified company with enormous potential ahead of it, said Cribiore said.

The agreement prevents O'Neal from joining a competitor for a period of 18 months.

In addition, O'Neal will get an office in New York City, not at the company's corporate headquarters, and an executive assistant for up to three years.

O'Neal will also step down as a director on Blackrock's board.