As President Obama traveled to Wall Street on Monday and chided bankers for their recklessness, across town a federal judge issued a far sharper rebuke, not just for some of the financiers but for their regulators in Washington as well.

Giving voice to the anger and frustration of many ordinary Americans, Judge Jed S. Rakoff issued a scathing ruling on one of the watershed moments of the financial crisis: the star-crossed takeover of Merrill Lynch by the now-struggling Bank of America.

Judge Rakoff refused to approve a $33 million deal that would have settled a lawsuit filed by the Securities and Exchange Commission against the Bank of America. The lawsuit alleged that the bank failed to adequately disclose the bonuses that were paid by Merrill before the merger, which was completed in January at regulators’ behest as Merrill foundered.

He accused the S.E.C. of failing in its role as Wall Street’s top cop by going too easy on one of the biggest banks it regulates. And he accused executives of the Bank of America of failing to take responsibility for actions that blindsided its shareholders and the taxpayers who bailed out the bank at the height of the crisis.