Bank of America Corp on Monday won approval of a $150 million settlement with the U.S. Securities and Exchange Commission over the Merrill Lynch & Co merger, ending an embarrassing public battle between the largest U.S. bank and the nation's top securities regulator.

U.S. District Judge Jed Rakoff on Monday approved the settlement but also lamented its deficiencies, calling it half-baked justice at best.

The settlement ends two lawsuits by the SEC against Bank of America. One alleged that the bank misled shareholders about $3.6 billion of bonuses that Merrill paid out. The other alleged that the bank misled shareholders about Merrill losses, which reached $15.8 billion in the fourth quarter of 2008.

Its greatest defect is that it advocates very modest punitive, compensatory and remedial measures that are neither directed at the specific individuals responsible for the nondisclosures nor appear likely to have more than a very modest impact on corporate practices or victim compensation, Rakoff wrote. While better than nothing, this is half-baked justice at best.

Had Rakoff rejected the settlement, a trial over the bonuses would have begun on March 1.

The judge rejected a $33 million accord five months ago.

Shares of Bank of America rose 29 cents to $16.17 in morning trading on the New York Stock Exchange.

The cases are SEC v. Bank of America Corp, U.S. District Court, Southern District of New York, Nos. 09-06829 and 10-00215.

(Reporting by Grant McCool and Jonathan Stempel; editing by John Wallace)