NEW YORK– A federal judge said Monday he would reluctantly approve an amended $150 million settlement between the Securities and Exchange Commission and Bank of America to end civil charges accusing the bank of misleading shareholders when it acquired Merrill Lynch.

But U.S. District Court Judge Jed S. Rakoff called the revised pact ”half-baked justice at best” and said the court approved it ”while shaking its head.” The dispute had been scheduled for trial next week.

The judge last year rejected a $33 million settlement stemming from the early 2009 acquisition, calling it a breach of ”justice and morality.”

Rakoff said Monday in his written order approving the revised settlement that it was ”considerably improved” but ”far from ideal.”

He said the new deal’s 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.”

He added: ”While better than nothing, this is half-baked justice at best.”

The SEC had accused Bank of America of failing to disclose to shareholders before they voted on the Merrill deal that it had authorized Merrill to pay up to $5.8 billion in bonuses to its employees in 2008 even though the investment bank lost $27.6 billion that year.

He said his approval depends on both sides formally ratifying the amended agreement by Thursday, including a change he had recommended — that an independent auditor to oversee accounting at the bank be fully acceptable to the SEC with the judge having final say if the two sides cannot agree.

The new deal also requires that the independent auditor assess over the next years whether the bank’s accounting controls and procedures are adequate to assure proper public disclosures. And it calls for the bank to begin submitting executive compensation recommendations to shareholders for a nonbinding vote of approval or disapproval over the next three years.

”Given that the apparent working assumption of the bank’s decision-makers and lawyers involved in the underlying events at issue here was not to disclose information if a rationale could be found for not doing so, the proposed remedial steps should help foster a healthier attitude of ‘when in doubt, disclose,’ ” the judge wrote.

The judge said he would have rejected the revised settlement, which he said provides shareholders a few pennies per share, if he were deciding the issue solely on the merits but he said the law requires him to give substantial deference to the SEC’s view and he believed it was an instance when judicial restraint was appropriate.

Bank of America spokesman Robert Stickler said the bank was ”very pleased” that the settlement was approved.

An SEC spokesman in Washington, John Nester, also said the agency was pleased, calling the accord ”fair, reasonable and in the best interest of investors.”

The $150 million penalty is the largest ever levied by the SEC for a violation of that kind, he said, noting that the settlement also calls for internal changes to be made by Bank of America to avoid future violations of disclosure rules. ”The settlement was based on a thorough and objective assessment of the facts and the law, and sends a strong message that companies must give shareholders all material information about corporate transactions subject to shareholder approval,” Nester said in a statement.

At a recent hearing, Rakoff had questioned why the SEC’s agreement with Bank of America was not as critical as recent charges brought by the New York attorney general’s office that were more suggestive of intentional fraud by bank executives.

He said he has since reviewed the underlying facts before the SEC and the inferences the agency had drawn and found them ”not to be irrational.”

He said he was most troubled that a penalty package essentially consisting of a $150 million fine ”appears paltry.”

He said he was also bothered that the fine penalizes the shareholders for what was, ”in effect if not in intent, a fraud by management on the shareholders.”

The irony, he said, was that it is an acquisition that ”may yet turn out well but that could have been a bank-destroying disaster if the U.S. taxpayer had not saved the day.”