Leonard J. Kerpelman, a Baltimore lawyer and gadfly who successfully argued a landmark Supreme Court case in 1963 that led to a ban on state-supported prayer in public schools, died on Sept. 26 in Baltimore. He was 88.

The cause was complications of a tumor, his son Jason Kerpelman said.

Mr. Kerpelman, who once proudly referred to himself as “a pariah to the Establishment,” blended a legal career with a commitment to causes, including historical preservation, environmental activism, government transparency and the rights of divorced fathers.

He was best known for representing Madalyn Murray O’Hair, the founder of the group American Atheists, who on behalf of her teenage son William J. Murray III objected to a Baltimore rule requiring the Lord’s Prayer and Bible verses to begin each school day.

Mr. Kerpelman took on the case, pro bono, after Mrs. O’Hair parted ways with her first lawyer in the middle of an appeal. Mr. Kerpelman’s wife, Elinor, had encouraged him to reach out to her, he recalled, because “she felt sympathy for her.”