Viruses that evade destruction by commonly used drugs are a real and worrying possibility in the future, warn UK health experts.
Viruses are learning how to evade drug destruction
More people with forms of HIV which are resistant to multidrug treatments are already being seen, say Health Protection Agency scientists.
The agency said it would be keeping a close eye on the situation to help prevent future outbreaks.
It will be issuing a report this autumn outlining the threat.
Professor Peter Borriello, the director of the HPA's Centre for Infections, said it was not a case of whether we would see resistance, but when.
"Resistance is inevitable." He said it was already a problem with HIV.
"If you look at HIV, which is the most devastating viral infection to emerge, it is quite obvious that the longer the treatment, the higher the risk."
The HPA and other research institutes tracked resistance to antiviral drugs among 4,450 HIV patients over six years.
After two years on the most potent treatment known for HIV, a cocktail of three drugs collectively called HAART (highly active anti-retroviral therapy), 10% of the patients had developed some resistance to the drugs, rendering them ineffective.
After four years, 20% had resistance and after six years, the drugs no longer worked in 30% of the patients.
Looking at people with HIV in the general population of the UK, up to one in five people with the virus will have drug-resistant HIV - in 4% of cases the virus will be resistant to all of the three HAART drugs, the HPA estimates.
There are approximately 60,000 people in the UK with HIV. In 2003, about 35,500 were on HAART.
Among newly diagnosed HIV patients who have not yet started any drug treatment, the drug resistance rate is thought to be about the same, one in five, suggesting resistant strains are being transmitted from person to person.
Professor Borriello said scientists were urgently seeking new drugs to treat HIV. Another option being considered is treating HIV aggressively as soon as it is diagnosed.
"What is being proposed is a detailed evaluation of what you might call hard and fast treatment."
He said professionals were looking at treating people with early HIV immediately with aggressive HAART therapy for a year, even if their immune status was still at a very good level and the amount of virus that they had was fairly low.
Professor Pat Troop, chief executive of the HPA, said they were also working with countries where HIV is a bigger problem, such as South Africa, to make sure that rolling out more drug treatment did not lead to more resistance.
"It's a genuine anxiety," she said.
Lisa Power, head of policy at Terrence Higgins Trust, said: "It's extremely important for people to realise that HIV drug resistance can be transmitted as part of the virus.
"Everybody who is diagnosed with HIV should automatically be checked for resistance before they are put on any treatments in order not to waste their health or the NHS's money."
She said much of the HIV data was historical and at a time when the importance of proper treatment management was poorly understood.
"We now know how vital it is to take treatments at the proper times and new treatments have been designed to be much easier to take," she said.
Other viruses are also developing resistance.
For hepatitis B, which causes liver disease, about 20% of strains have now found a way to evade the drug most commonly used to fight the disease.
Another 5% have found ways to resist newer hepatitis B drugs.
About 1% of strains of the virus that causes flu are now resistant to drugs such as Relenza and Tamiflu, said Professor Borriello.