Bank of America Corp CEO Kenneth Lewis announced he was retiring, after months of being dogged by a series of government investigations into the company's acquisition of Merrill Lynch last year that had become a major distraction for the biggest U.S. bank.

The reputation of the 62-year-old Lewis had been badly bruised by massive credit losses and the need for two government bailouts. But experts believe it was the intense scrutiny from federal regulators, state attorneys general and the courts that forced his hand.

It's a good thing for the company to make a clean break and move forward, said Walter Todd, portfolio manager for Greenwood Capital Associates.

He added that regardless of the reality, the perception is, everything that happened with the Merrill transaction was his fault, and for Bank of America to move beyond that, Lewis would have to go.

Bank of America shares, which have shed 50 percent since the Merrill Lynch deal was announced on September 15, 2008, the same day Lehman Brothers declared bankruptcy, were up 2 percent in after-hours trading.

His retirement by the end of the year -- which Lewis characterized as voluntary in a letter to employees -- sets up a struggle within the bank's ranks to be his successor, with six possible candidates seen vying for the job, including recently named wealth management chief Sally Krawcheck, consumer banking chief Brian Moynihan and Chief Financial Officer Joe Price.

His departure underlines the dramatic change there has been at the top of the nation's banks in the past two years. Only Lloyd Blankfein, the head of Goldman Sachs Group Inc , and Jamie Dimon, CEO of JPMorgan Chase & Co , have survived. Some lost their jobs as their banks collapsed or were taken over. Others resigned or were forced out as results suffered.

Lewis' planned retirement could raise new questions about the staying power of Citigroup Inc Chief Executive Vikram Pandit, who, like Lewis has been under pressure from regulators after his bank received a massive taxpayer bailout.

In addition to Krawcheck, Moynihan and Price, leading candidates to eventually replace Lewis include mortgage lending chief Barbara Desoer, investment banking chief Thomas Montag and Greg Curl, chief risk officer, said bank spokesman Bob Stickler.

LEWIS WOULD BUILD TOP U.S. BANK

Known as a dealmaker, Lewis built the largest U.S. retail banking franchise through aggressive acquisitions.

Yet his last deal appears to have been his undoing.

In September 2008, the bank announced a $50 billion buyout of Merrill Lynch & Co at the height of the financial crisis.

At the time, Lewis and the bank were heralded as saviors of the financial system.

But they began to draw public ire when questions arose in early 2009 about how the bank publicly disclosed roughly $3 billion in accelerated Merrill Lynch bonus payments and billions in Merrill Lynch losses during fourth quarter 2008 in advance of a shareholder vote on the deal.

In a letter to employees, Lewis said his retirement was his decision, and not the result of outside pressure, either from the board, or regulators and the government.

A successor will be selected in advance of Lewis' retirement, and there will be an unspecified transition period before his retirement at year-end, Stickler said.

While some investors still believe the Merrill deal will be a long-term success for the bank, in the short term it spawned on-going state and federal investigations that centered on what senior executives, namely Lewis, knew about the deal and failed to disclose publicly.

The New York Attorney General's office, Securities and Exchange Commission, the Department of Justice and various pension funds are all investigating possible wrongdoing in the deal.

New York Attorney General Andrew Cuomo said Lewis' resignation would have no effect on his investigation.

House Oversight and Government Reform panel chairman Edolphus Towns said he hoped the bank's new leadership would quickly repay taxpayers and resolve unanswered questions about the merger.

It also restokes speculation about the bank's Charlotte headquarters potentially moving to New York.

After Lewis' retirement the ties of management and the board to Charlotte will be their weakest since its inception. The bank has no current director from North Carolina, and the majority of the current executive team are located outside Charlotte.

Lewis ran Bank of America for nearly a decade, succeeding his mentor Hugh McColl in 2001.

He had previously announced hopes of retiring after the bank repaid $45 billion in government assistance, or when he hit the company's mandatory retirement age of 65.

Executives typically receive payouts and perks upon their retirement, like consulting agreements, secretarial services, cars or continued health coverage.

Its unclear what Lewis may receive, because the company has few formal retirement programs in place.

We believe that our executive officers should be able to provide for their retirement needs from the compensation they earn based on our performance, the bank's 2009 proxy states.

The proxy statement indicates Lewis could receive payouts of $50 million or more from some programs suspended earlier this decade.

(Additional reporting by Jonathan Stempel and Dan Wilchins in New York, Rachelle Younglai in Washington; Editing Bernard Orr)