After criticizing a plea deal, Los Angeles federal Judge John Walter accepted it, but sentenced star plaintiff attorney William Lerach to the highest term under the agreement — 24 months in federal prison.

Walter hammered prosecutors in court Monday about why they cut the deal with Lerach, who pleaded guilty in connection with kickbacks to lead plaintiffs of his former law firm, now known as Milberg Weiss. Lerach pleaded guilty to a single count of giving an improper payment to a plaintiff.