Merrill Lynch & Co., Inc. chairman and CEO Stan O’Neal announced on Tuesday that he has decided to retire from the company effective immediately.

O’Neal’s resignation follows the revelation that Merrill Lynch suffered far larger than expected losses and writedowns due to the subprime crisis. The company said O’Neal and the board of directors both agreed that a change in leadership would best enable Merrill Lynch to move forward and focus on maintaining the strong operating performance of its businesses, which the company reported were performing well, apart from subprime mortgages and CDOs.

He has been CEO of the company since December 2002 and joined the company 21 years ago. The company said the board of directors has elected Alberto Cribiore as interim non-executive chairman.

Merrill Lynch said Cribiore, who has been a member of the Merrill Lynch board since 2003, also will chair a search committee that will identify and evaluate CEO candidates both from within and outside of the company. He is managing partner and founder of Brera Capital, a global private equity firm, and former president of private equity firm Clayton Dubilier & Rice.

Cribiore said that Ahmass Fakahany and Gregory Fleming will continue as Merrill Lynch co-presidents and chief operating officers. He further noted that Fakahany will lead the company’s global support, finance and human resources functions and that Fleming will lead the integrated businesses of Merrill Lynch & Co., including risk management.