Dr. Baruch S. Blumberg, the Nobel Prize-winning biochemist and medical anthropologist who discovered the hepatitis B virus, showed that it could cause liver cancer and then helped develop a powerful vaccine to fight it, saving millions of lives, died Tuesday in Moffett Field, Calif. He was 85 and lived in Philadelphia.

His family said he died, apparently of a heart attack, shortly after giving a keynote speech at a NASA conference at the Ames Research Center in Moffett Field, which is in the San Francisco Bay area. Dr. Blumberg had long been associated with a NASA project to hunt for micro-organisms in space.

Dr. Blumberg’s prize-winning virology and epidemiology work began in the 1960s at the Fox Chase Cancer Center in Philadelphia and took him and his colleagues on field trips around the world, from Japan to Africa.

The work led to the discovery of the hepatitis B virus in 1967, the first test for hepatitis B in the blood supply and the development in 1969 of the hepatitis B vaccine — the first “cancer vaccine.” Dr. Irving Millman, a colleague at the research center, was its co-creator.