More recently, a 50-year-old man in Trenton underwent a far less difficult gene therapy procedure. While he was not cured, his body was able to briefly control the virus after he stopped taking the usual antiviral drugs, something that is highly unusual.

''It's hard to understate how the scientific community has swung in its thinking about the possibility that we can do this,'' said Kevin Frost, chief executive of the Foundation for Aids Research, a nonprofit group. ''Cure, in the context of H.I.V., had become almost a four-letter word.''

There were attempts in the past to cure the disease, but most experts thought it more feasible to focus on prevention and treatment.

The push for a cure might seem even less urgent now that antiviral drugs have turned H.I.V. infection from a near-certain death sentence to a chronic disease for many people.

But the drugs are not available to everyone, and they do not eliminate the infection. Even if undetectable in the blood, the human immunodeficiency virus lurks quietly in the body. If a patient stops taking the drugs, the virus almost always comes roaring back.

So people with H.I.V. now must take drugs every day for life, which some researchers say is not a sustainable solution for tens of millions of infected people.

''I don't think the world has the resources to deliver these drugs to everyone who needs them for decades,'' said Dr. Steven Deeks, professor of medicine at the University of California, San Francisco.

A cure may be the only realistic solution. The National Institute of Allergy and Infectious Diseases, which says a cure is one of its top priorities, this year awarded grants that could total $70 million over five years to three research teams in pursuit of that goal. More grants are coming.

California's stem-cell agency has committed a total of $38 million to three projects intended to find a cure. Companies like Merck, Gilead Sciences, Sangamo BioSciences and Calimmune have begun research.

It will be years before there is a cure, if there ever is, though some scientists are more optimistic than others.

''I think we are much closer to a cure than we are to a vaccine,'' said Rafick-Pierre S?ly, scientific director of the Vaccine and Gene Therapy Institute of Florida.

There are two main approaches. One is a so-called sterilizing cure -- the eradication of H.I.V. from the body. The other, a functional cure, would not eliminate the virus but would allow a person to remain healthy without antiviral drugs.

Hope for a cure was raised in part by the experience of the Berlin patient, an American named Timothy Brown who had both H.I.V. and leukemia.

In 2007 and 2008, while living in Berlin, Mr. Brown received two bone-marrow transplants to treat his leukemia. The donor was among the 1 percent of Northern Europeans naturally resistant to H.I.V. infection because they lack CCR5, a protein on the surface of immune cells that the virus uses as an entry portal.

With his own immune system replaced by one resistant to infection, Mr. Brown, 45, who now lives in San Francisco, has apparently been free of the virus for about four years. But bone marrow transplants are grueling, risky and expensive. Moreover, it is hard enough to find an immunologically matching donor, let alone one with mutations in both copies of the CCR5 gene.

So scientists are trying to modify a patient's own immune cells to make them resistant to infection by eliminating CCR5.

This is what was done with the Trenton patient. Some of the man's white blood cells were removed from his body and treated with a gene therapy developed by Sangamo BioSciences. The therapy induced the cells to produce proteins called zinc-finger nucleases that can disrupt the CCR5 gene.

The treated cells were then infused back into the man's body. One month later, as part of the experiment, the man stopped taking his antiviral drugs for 12 weeks.

As expected, the amount of H.I.V. in his blood shot up. But then it fell back to an undetectable level just before the end of the 12-week period. The patient's immune cell counts also shot up.

''I felt like Superman,'' he said in an interview, though this could have been partly because he stopped taking the antiviral drugs that had caused fatigue.

The man spoke on the condition of anonymity because he has not told many friends and relatives that he has H.I.V.

Dr. Pablo Tebas, a professor at the University of Pennsylvania who treated the man, said, ''It is only one individual, but it is a remarkable result.'' Some outside experts were cautious. ''At 12 weeks, you can't say that this therapy works and the patient is controlling it by himself,'' said Dr. Jeffrey Laurence, director of the AIDS research laboratory at Weill Cornell Medical College.

Nevertheless, he called the results ''amazing.''

The gene therapy did not work so well for five other patients, according to results presented in September at the Interscience Conference on Antimicrobial Agents and Chemotherapy.

Researchers hypothesize that the Trenton patient did better because he had an inherited mutation in one of his two CCR5 genes, making the job easier for the gene therapy. Up to 13.5 percent of his CD4 cells, the main immune cells infected by H.I.V., were missing both copies of the CCR5 gene after the treatment. That is about twice as much as observed in the other patients.

Still, a vast majority of his CD4 cells were not genetically altered and remained susceptible to infection, making it puzzling that the therapy worked at all.

Some scientists said this suggested that freeing as little as 10 percent of CD4 cells from infection might somehow allow the immune system to control the virus. Researchers are contemplating how to increase the percentage of CCR5-deficient cells in patients who lack the Trenton man's genetic mutation.

A team from the City of Hope and the University of Southern California, and another team from Calimmune and the University of California, Los Angeles, are working on disabling the CCR5 genes in blood stem cells. That would potentially make the entire immune system permanently resistant to infection, though patients would require a stem cell transplant.

Detractors say a functional cure would not offer much beyond existing drug therapy.

''Any approach that is going to require genetic engineering on a patient-by-patient basis is just utterly unrealistic in terms of the global epidemic,'' said Dr. Robert Siliciano, professor of medicine at Johns Hopkins.

Dr. David Margolis, of the University of North Carolina, said, ''Some sort of gene therapy like that, that suppresses viral load to some extent for some period of time, is not a lot different from taking one pill once a day.''

Dr. Siliciano and Dr. Margolis are trying to eradicate the virus from the body.

H.I.V. can lie dormant for years. One refuge is the resting memory T-cells, which are the long-lived cells that ''remember'' exposure to a pathogen and help mount an immune response if the same germ invades the body years later.

The hope is that a drug can activate the latent virus and flush it out of its hiding places. One candidate, now being tested in a small clinical trial, is vorinostat, sold by Merck under the name Zolinza to treat a rare cancer.

Vorinostat reverses a mechanism that cells use to silence genes. H.I.V. is believed to take advantage of this mechanism to become dormant.

Another candidate, now being tested in primates, is an antibody developed by Merck to block a protein called PD-1.

But the sterilizing cure would also be challenging. ''The virus is in the brain, it's in the heart, it's in the kidney, it's in lots of different tissues,'' said Dr. Jay Levy, a virologist at the University of California, San Francisco.

Vorinostat might activate not only the virus, but also genes that are supposed to remain silenced, causing side effects. Activating too many resting memory T-cells could lead to a dangerous immune system overreaction.

And once the cells and viruses are awakened, they would have to be killed, not just allowed to run amok.

Any attempt at a cure must be very safe, because most patients already do well on antiviral drugs, said Mark Harrington, executive director of the Treatment Action Group, an AIDS research policy organization.

Still, Mr. Brown, the Berlin patient, is now giving speeches urging work on a cure. And the Trenton patient, who is back on antiviral drugs, said he wants to be treated again.

''I feel like Oliver Twist in the orphanage,'' he said, ''going up with the empty bowl in his hand saying, 'Please, may I have more, sir?' ''

PHOTO: VIRUS-FREE: Timothy Brown of San Francisco had two bone-marrow transplants to treat leukemia, and H.I.V. can no longer be detected in his body. (PHOTOGRAPH BY HEIDI SCHUMANN FOR THE NEW YORK TIMES)(D2)