Thomas K. Gilhool, 81, of Philadelphia, a lawyer who fought for the rights of children, the disabled, and the poor, died Saturday, Aug. 22, at Massachusetts General Hospital in Boston after suffering a heart attack while on vacation.

Mr. Gilhool was lead counsel in two landmark federal cases that changed treatment of the nation’s disabled people. He believed they had civil rights that could be enforced through litigation, something that hadn’t been done before.

“Those who knew Tom recall his creativity, passionate spirit, perseverance, driving energy, and leadership,” said a statement from the Public Interest Law Center, where he was chief counsel for a quarter century. “When he found a path forward for advancing justice, he inspired others to follow and gave them the tools and knowledge to do so.”

In Pennsylvania Association for Retarded Children v. Commonwealth of Pennsylvania (1971), he argued the state must guarantee a free public school education to children with intellectual disabilities. Previously, they had been barred from public school.

The case eventually resulted in a 1975 federal law now called the Individuals with Disabilities Education Act. It mandated that an individualized education program (IEP) be created for each student.

In the second case, Halderman v. Pennhurst State School and Hospital (1974) Mr. Gilhool argued that the segregation of Pennhurst residents and the harsh conditions to which they were exposed violated their constitutional right to equal treatment under the law.

In 1977, U.S. District Court Judge Raymond Broderick ruled that isolation at the institution for the mentally and physically disabled was “clearly separate and not equal.” He ordered the state to place residents in the community with appropriate social services. After appeals were exhausted, Pennhurst closed in 1987.

Mr. Gilhool’s work sparked a national movement for the removal of the disabled from asylums, but it also resonated personally with Mr. Gilhool whose brother, Bob, was developmentally disabled. When his father died in 1954, Mr. Gilhool persuaded his mother to send Bob, then 10, to Pennhurst.

“I remember telling her it was just like a college campus, to my everlasting shame,” Mr. Gilhool said in a 2008 Inquirer article. “We could have invented something, even then, to keep him at home.” His brother left Pennhurst in 1961 and is in a group home.

Born in Ardmore, Mr. Gilhool came from a family of Pennsylvania miners who struggled during the Great Depression. He knew his life’s work would be advocating for the downtrodden.

“I somehow knew — and I think it came directly from my mother and father — there is no greater happiness than participating in struggles to rearrange things,” he said in an oral history recorded from 2004 to 2008 by the Disability Rights and Independent Living Movement Project at the University of California.

As a young attorney, Mr. Gilhool was part of the first generation of legal service lawyers, helping to support the founding of Community Legal Services. He ran unsuccessfully for Philadelphia City Council twice in the late 1960s and supported welfare rights groups in the city.

He earned a bachelor’s degree from Lehigh University in 1960, and both a master’s degree in political science and a law degree from Yale University in 1964, the same year he married law school classmate Gillian Russell.

After law school, he joined the Philadelphia law firm Dilworth Paxson, where he worked on the Girard College case. Stephen Girard had left a fortune in the 1840s to fund a school for poor white male orphans. In the 1960s, civil rights leaders fought to integrate the school.

“And so, I became the guy who worked with Cecil B. Moore, the NAACP leader, in finding plaintiffs,” Mr. Gilhool said. In 1968, the U.S. Court of Appeals for the Third Circuit ruled that Girard College must accept Black students.

In 1975, he joined the Public Interest Law Center. He worked on numerous lawsuits, including one to ensure that severely impaired children received instruction in school and not just custodial care.

“One important thing he did was hire some amazing people and establish an agenda,” said his wife, Gillian.

He served as Gov. Robert P. Casey’s secretary of education from 1987 to 1989, then taught eighth grade for a year at Philly’s tough Vaux Middle School.

Besides his brother, Bob, and his wife, Gillian, he is survived by a daughter, Bridget Russell Gilhool; a son, Nicholas Kane Gilhool; four grandchildren; and a sister.

Plans for a memorial celebration were pending.