The field was abandoned for a time. But in 1991, Dr. Martuza seized upon the idea of using the herpes simplex virus (HSV-1) as a cancer-fighter.

The genome of HSV-1 is comparatively large and can accommodate a number of mutations and deletions. Dr. Martuza weakened the virus by removing some of its genes. The modified virus was injected into mice with brain cancer, and it did bring about remission. But most of the mice died of encephalitis.

In 1990, Bernard Roizman, a virologist at the University of Chicago, found a “master gene” in the herpes virus. When this gene is removed, the virus no longer has the strength to overcome healthy cells’ defenses. As it turned out, the modified virus was so crippled that it could only slow tumor growth.

Then, in 1996, Dr. Ian Mohr, a virologist at New York University, stumbled on a way of further altering Dr. Roizman’s crippled virus. He exposed it repeatedly to cancer cells until a new viral mutant evolved with the ability to replicate in those cells.

Dr. Mohr and a doctoral student, Matt Mulvey, then engineered a way for their virus to evade the immune system, making it an even more potent cancer-killing agent.

Unlike chemotherapy, which can diminish in effectiveness over time, oncolytic viruses multiply in the body and gain strength as the infection becomes established. In addition to attacking cancer cells directly, some also produce an immune response that targets tumors.

Today, several potential cancer-fighting viruses are in trials, including two in Phase 3 trials.

An engineered form of vaccinia — the viral agent that helped eradicate smallpox — is being tested against advanced liver cancer, the third leading cause of cancer deaths globally. In a recent trial, survival for patients treated with high doses of the virus, called JX-594, doubled to 14 months from 7, compared with that of patients treated with low doses.