HIV can trigger learning and memory deficits by launching a double attack on the brain, research shows.
The protein is found on the coating of the virus
It was already known that a protein on the surface of the virus could kill off mature brain cells.
But the latest study shows it also prevents the production of replacements by crippling cells with the potential to step in and take their place.
The University of California at San Diego study appears in the journal Cell Stem Cell.
The researchers hope their work, which was carried out on mice, will aid efforts to find new ways to combat HIV-associated dementia.
Researcher Dr Marcus Kaul said: "It's a double hit to the brain.
"The HIV protein both causes brain injury and prevents its repair."
The success of antiretroviral therapies in keeping "viral load" down has helped to reduce the severity of HIV-associated dementia in recent years.
However, the condition is becoming more common as people with HIV are living longer.
Part of the problem is that anti-HIV drugs find it tough to enter the brain.
The researchers had already shown that a protein called gp120, which is found on HIV's outer coating, can kill off brain cells by disrupting their internal chemistry.
In the latest study, they showed that gp120 also slows production of new brain cells in the hippocampus, a brain region central to learning and memory.
Under normal circumstances, these newborn cells become integrated into existing brain circuits and are thought to contribute to certain forms of learning and memory.
It appears the same chemical disruption that kills cells is also responsible for blocking production of replacements.
Dr Kaul said: "This indicates that we might eventually treat this form of dementia by either ramping up brain repair or protecting the repair mechanism."
Keith Alcorn, senior editor of the HIV information service NAM, said: "The discovery that HIV affects stem cell proliferation in the brain is bound to add to concerns that people with HIV doing well on antiretroviral therapy may nevertheless face a higher risk of dementia in years to come.
"Antiretroviral drugs have lowered viral load so that HIV will not kill cells directly, but we don't know the consequences for brain functioning of a long-term low level of infection.
"It may be that low level infection is enough to interfere with the regeneration pathways in the way shown in this experiment."
Vanessa Griffiths, clinical director at the HIV charity Terrence Higgins Trust said: "This is fascinating research, but at an extremely early stage.
"It may well produce benefits for people with HIV, but that is still some years away."