Countrywide Financial Corp, the mortgage lender acquired by Bank of America Corp , has agreed to a $624 million settlement of a lawsuit accusing it of misleading investors about its lending practices.

Countrywide will pay $600 million and its former auditor KPMG LLP will pay $24 million to resolve the class-action litigation, which covers investors who bought the lender's securities between March 12, 2004 and March 7, 2008.

The case was led by several pension funds, including the New York State Common Retirement Fund, that state's $129.4 billion public pension fund, and five New York City pension funds.

This is a very good settlement that helps repair the damage Countrywide has done, New York State Comptroller Thomas DiNapoli, who oversees the Common Retirement Fund, said in a statement.

Bank of America spokeswoman Shirley Norton said that the bank agreed to the settlement to avoid further costs and uncertainty of litigation, and that Countrywide denied wrongdoing.

KPMG spokesman George Ledwith confirmed the settlement, without elaborating.

Once the largest U.S. mortgage lender, Countrywide and its long-time chief executive, Angelo Mozilo, became synonymous with risky lending practices that helped fuel the U.S. housing boom and subsequent bust.

Countrywide nearly collapsed as credit markets tightened, before Bank of America agreed to buy it in January 2008. The largest U.S. bank closed the $2.5 billion takeover that July.

In the lawsuit, the pension funds alleged that Countrywide, Mozilo and other officials misled them about the company's lending risks, including a large reliance on risky subprime and option adjustable-rate mortgages to fuel rapid growth.

They said this contrasted with public assurances that Countrywide would survive the nation's housing downturn.

This behavior is unacceptable in corporate America, said New York City Comptroller John Liu, who advises the five city pension funds in the case.

Countrywide once made one in six U.S. home loans.

FLYING BLIND

Mozilo, 71, and two other former Countrywide executives remain defendants in a U.S. Securities and Exchange Commission civil fraud lawsuit.

The SEC claimed Mozilo misled investors about Countrywide loans and violated insider trading rules in generating a $139 million profit by exercising stock options in 2006 and 2007.

It said the exercises came after he admitted in an email to colleagues that Countrywide was flying blind as to the quality of the loans.

David Siegel, a lawyer for Mozilo, did not immediately return a call and email seeking comment.

Bank of America dropped the Countrywide name a year ago. The bank is based in Charlotte, North Carolina. Countrywide was based in Calabasas, California.

The settlement requires approval by Judge Mariana Pfaelzer in Los Angeles. The pension funds said the accord would be the 13th largest securities class-action settlement since federal laws on private securities litigation were overhauled in 1995.

Shares of Bank of America fell 7 cents to $16.21 in afternoon trading on the New York Stock Exchange.

The case is In re: Countrywide Financial Corp Securities Litigation, U.S. District Court, Central District of California, No. 07-05295.

(Reporting by Jonathan Stempel; Editing by Gerald E. McCormick and Steve Orlofsky)