Young people on the latest HIV drugs now have near-normal life expectancy because of improvements in treatments, a study in The Lancet suggests.
Twenty-year-olds who started antiretroviral therapy in 2010 are projected to live 10 years longer than those first using it in 1996, it found.
Doctors say that starting treatment early is crucial to achieve a long and healthy life.
Charities say there are still too many people unaware they have the virus.
This is particularly true in the developing world, where the majority of HIV deaths occur because access to drugs is limited.
More effective prevention
The study authors, from the University of Bristol, said the extraordinary success of HIV treatments was a result of newer drugs having fewer side effects and being better at preventing the virus from replicating in the body.
It is also more difficult for the virus to build up a resistance to the most recent drugs.
Improved screening and prevention programmes and better treatment of health problems caused by HIV are thought to have helped, too.
But many people with HIV still do not live as long as expected, especially those infected through injecting drugs.
Antiretroviral therapy involves a combination of three or more drugs which block the normal progress of HIV (human immunodeficiency virus).
They have been called "one of the greatest public health success stories of the past 40 years".
Drugs 'do work'
Jimmy Isaacs, 28, discovered he had been infected with HIV by a former partner nearly three years ago.
He takes three drugs once a day at 18:00 and will continue to do so for the rest of his life.
"My health is absolutely fine. I'm eating healthily and drinking healthily," he said.
"It doesn't impact on my job and hasn't impacted on my social life either."
Although it took two changes of medication to find the right combination for him, he says he now has no side effects at all.
"I had heard a lot of bad stories about the drugs back in the '90s - but when I did some research, I realised the drugs had completely changed."
Not all his employers have been supportive since his diagnosis and he says that is down to ignorance.
His current employer has given him time off to tour the country and speak to students and school pupils about HIV prevention and treatment.
The researchers looked at 88,500 people with HIV from Europe and North America who had been involved in 18 studies.
They based their life-expectancy predictions on death rates during the first three years of follow-up after drug treatment was started.
They found that fewer people who started treatment between 2008 and 2010 died during this period compared with those who began treatment between 1996 and 2007.
The expected age at death of a 20-year-old patient starting antiretroviral therapy (ART) after 2008, with a low viral load and after the first year of treatment, was 78 years - similar to the general population.
What is antiretroviral therapy?
- First used in 1996, it involves a combination of three or more drugs that stop the HIV virus from replicating
- This means damage to the immune system caused by HIV can be prevented and it stops the disease spreading to others
- More recent drugs are even more efficient and have fewer side effects
- The World Health Organization recommends that antiretroviral therapy is started as soon as possible after diagnosis
Dr Michael Brady, medical director at the Terrence Higgins Trust, said the study showed how much things had changed since the start of the HIV epidemic in the 1980s.
But he said it also meant people aged over 50 now represented one in three of all those living with HIV.
"As it stands, the healthcare, social care and welfare systems simply aren't ready to support the increasing numbers of people growing older with HIV.
"We need a new model of care to better integrate primary care with HIV specialist services, and we need a major shift in awareness and training around HIV and ageing, so that we're ready to help older people live well in later life," he said.
Prof Helen Stokes-Lampard, who chairs the Royal College of GPs, said: "It's a tremendous medical achievement that an infection that once had such a terrible prognosis is now so manageable, and that patients with HIV are living significantly longer.
"We hope the results of this study go a long way to finally removing any remaining stigma associated with HIV, and ensuring that patients with HIV can live long and healthy lives without experiencing difficulties in gaining employment and - in countries where it is necessary - obtaining medical insurance."
She said steps were being taken to increase appropriate HIV testing by GPs.
The proportion of people with undiagnosed HIV has fallen steadily over the past 20 years.
But one in eight people with HIV is still thought to remain undiagnosed.