In January 1976, Philadelphia Daily News staffer Pete Dexter reported that the Philadelphia Gay News had just published its first edition, with a "lavender-colored front-page story about Dr. Walter J. Lear."

The headline: "Philadelphia health official comes out."

The new monthly newspaper reported that Dr. Lear, who was 52, only recently "came out of the closet . . . to emphasize the need for better medical treatment for gays."

Dr. Lear, living in Powelton Village with his partner of 22 years, was the regional health commissioner for the Pennsylvania Health Department.

"While he doubtless is not the only homosexual holding high appointive office," The Inquirer later reported, "he is the first in Pennsylvania to come out of the closet and become a gay rights activist."

On Saturday, May 29, Dr. Lear, 87, died of multiple myeloma at Keystone Hospice in Wyndmoor.

In 2006, the American Public Health Association presented him with its Helen Rodriguez-Trias Social Justice Award, given for "working toward social justice for underserved and disadvantaged populations."

In 1964, Dr. Lear had moved from New York City to become deputy health commissioner for Philadelphia Mayor James H.J. Tate, who later appointed him acting executive director of Philadelphia General Hospital.

Gov. Milton J. Shapp's administration in 1971 named him health commissioner for the Philadelphia region, the job he held when he went public.

After that 1976 Gay News revelation, Dr. Lear told The Inquirer, "I have no doubt" that Tate would have had no job for him in 1964 "if I had been publicly gay."

"Twelve years ago that would have been totally unacceptable."

Several months earlier, Dr. Lear had made his first public move, presenting a gay rights resolution at the Chicago convention of the American Public Health Association. The convention endorsed the resolution and elected Dr. Lear general coordinator of the association's gay caucus, an event reported only in medical publications.

John Mosteller, a Haverford College administrator who is executor of the Lear estate, said last week that there was "a lighthearted, playful side to Walter."

Dr. Lear took part in some of the first national gatherings in the 1980s of the Radical Faeries, a gay social group, which he then introduced to Philadelphia.

The first EuroFaeries gathered on a Dutch island in 1995, and Dr. Lear visited their annual events there from 2000 to 2007.

Mosteller also said Dr. Lear "attended the 1998 Amsterdam Gay Games and won a swimming gold medal . . . for the 200-meter freestyle" for those older than 70.

Living on a small inheritance after leaving state government, Dr. Lear focused on social activism. Among other accomplishments, in 1979 he helped found the Mazzoni Center in Philadelphia, which its website says is the oldest AIDS service organization in the state. And in 1980, he was one of four founders of the Maternity Care Coalition in Philadelphia.

In 1984, Mayor W. Wilson Goode appointed him the first openly gay member of the Philadelphia Human Relations Commission.

In 1993, he was a founding board member of the Delaware Valley Legacy Fund, which "promotes philanthropy to benefit the gay, lesbian, bisexual, and transgendered communities," according to its website.

On the day before his 75th birthday in 1998, the Bread and Roses Community Fund, which identifies itself as a "gathering of activists committed to pursuing social justice," gave him its Paul Robeson Social Justice Award.

"Walter understood from the time he started his work that medicine was a social phenomenon," presenter Bob Brand said at the 1998 award ceremony. "He knew that equality makes people healthy, that changing policy brings solutions."

Born in Brooklyn, N.Y., Dr. Lear earned a bachelor's degree at Harvard University in 1943, his medical degree from the Long Island College of Medicine in 1946, and his master's in hospital administration at Columbia University in 1948.

He is survived by his partner, James Payne; his former wife, Evelyn Lear; and their children, son Jon Stewart and daughter Bonnie Stewart.

A memorial was set for 2 p.m. Saturday, June 19, in the Rare Book and Manuscript Library at the Van Pelt-Dietrich Library Center at the University of Pennsylvania.