The cause was complications of pneumonia, said his son, Dylan.

With a borrowed television tray and a folding chair that he set up on a downtown street steps away from a heroin den, Mr. Purchase began handing out syringes, bottles of bleach, cotton swabs and condoms in the summer of 1988. Within five months he had exchanged 13,000 clean needles (most of them bought at his own expense) for dirty ones — and was gaining wide attention from the news media.

"How does this work?" a toothless addict asked him, The New York Times reported in January 1989.

"You give me an old one, I give you a sterile one, and it keeps your butt alive," Mr. Purchase responded.

Mr. Purchase would trade as many as 10 needles at a time, while also handing out cookies and mittens.

By 1993 he had founded both the Point Defiance AIDS Project, with support from the Tacoma-Pierce County Health Department, and the North American Syringe Exchange Network. The network, which buys syringes wholesale and sells them at cost to programs across the country, now distributes more than 15 million syringes annually.

Articles over the years have cited Mr. Purchase's 1988 street-corner operation as the first exchange in the nation. Ethan Nadelmann, the executive director of the Drug Policy Alliance, which promotes alternatives to harsh legal treatment of drug users, could not confirm that.

"Whether or not he was literally the first to hand out syringes to stop AIDS, he was undoubtedly the godfather of needle exchange in America," Mr. Nadelmann said in an interview. "He was a mentor and adviser to activists and public health workers around the world."

In the early days of the AIDS epidemic, when many critics argued that needle exchanges encouraged drug use, Mr. Purchase "was able to get political acceptance in Tacoma and obtain public funding," said Don Des Jarlais, the director of research for the Chemical Dependency Institute at Beth Israel Medical Center in Manhattan.

When Mr. Purchase set up shop, he was without official government sanction or financial backing and, he said, was prepared to go to jail for 90 days for the misdemeanor offense of possessing drug paraphernalia. But he soon received support from the Tacoma police chief, Ray Fjetland, who suspended enforcement of the syringe law.

Mr. Purchase also worked closely with the county health department. The program became something of a model.

By 2011, according to a survey by Dr. Des Jarlais, there were 197 known needle-exchange programs in 36 states, the District of Columbia and Puerto Rico. That year, those exchanges distributed more than 36 million syringes.

"Given that over the course of the epidemic there have been several million people who injected drugs," Dr. Des Jarlais said, "the efforts of Dave and people like him have literally saved hundreds of thousands of lives."

In a way, David Joe Purchase found his calling on a Harley-Davidson. Born in Tacoma on Aug. 29, 1939, to Kenneth and Bernice Purchase, he was something of a rebel as a youngster. He worked at several jobs after dropping out of college.

"My dad was a biker, with the big beard, the black leather jacket," Mr. Purchase's son said. "Because of that look, he started assisting a friend who was a drug counselor who would send him around town when clients went missing — into bars, down an alley."

Mr. Purchase was nearly killed in 1983 when a drunken driver crashed into his motorcycle. After a long rehabilitation, he returned to work as a drug counselor and soon realized that many of his clients were dying of AIDS. He used $3,000 from a settlement from the accident to buy syringes and set up his table.

Mr. Purchase's marriages, to Sally Riewald and Sue Powers, ended in divorce. Beside his son, he is survived by a daughter from his first marriage, Rebecca Ford; two stepsons, Blake Barry and Kelly Powers; a stepdaughter, Krista Townsend; a sister, Karen Robinson; and three step-grandchildren.

In 2006, Mr. Purchase told The News Tribune in Tacoma that he would never consider giving up his work.

"I'd have to live with that," he said. "This is life and death. There were unnecessary deaths, unnecessary and preventable deaths."