The UK has some of the highest levels of resistance to HIV medication in the world - and levels are increasing, research suggests.
HIV may be modified by the immune system
A team of UK researchers warn progress in cutting death and disease from HIV could be imperilled.
They studied 2,357 people with HIV, and found 335 (14%) had some level of resistance to at least one drug before they had even begun therapy.
The study is published in the British Medical Journal.
It was carried out by researchers from University College London, the Medical Research Council Clinical Trials Unit and the Health Protection Agency.
Modern combinations of antiretroviral therapies have been used successfully to treat many people with HIV.
ESTIMATED HIV DRUG RESISTANCE
UK - 14%
US - 7%
France - 6%
However, concern is growing that new medications will be required as the virus mutates to render current drugs ineffective.
Lead researcher Dr Deenan Pillay told the BBC News website the first wave of drug resistance had occurred among patients who were undergoing therapy as the virus adapted to survive the attack.
But the latest finding suggested that people were now being infected with forms of HIV that were drug resistant from the outset - in many cases through unsafe sex with somebody who had undergone treatment.
Dr Pillay said: "The great success of treatment for HIV has meant for many it has become a chronic disease like diabetes or hypertension for which you just have to take pills, and carry on feeling well.
"However, one downside might be that some have become complacent about having unsafe sex.
"There is the potential that this phenomenon will compromise the great benefits of treatment that have been seen to date."
There are an estimated 60,000 people living with HIV in the UK, with around 27% of these thought to be undiagnosed.
The UCL team found three-quarters of the 335 drug-resistant patients were only resistant to drugs within one class of medications.
However, 44 showed resistance to drugs within two classes and 34 showed resistance to drugs within all three commonly used drug classes.
The tests were carried out between 1996 and 2003, and showed that levels of resistance appear to be increasing, with some drugs proving to be of little use for 19% of the patients tested in 2002-03.
The figures suggest the problem of resistance is more serious in the UK than elsewhere, although direct comparisons are difficult.
Yusef Azad, of the National Aids Trust, said: "Drug resistance is a matter of serious concern and reveals the need for people to heed safer sex messages.
"It also reveals the need for clearer guidance from health professionals for people living with HIV, who could be at risk from super infection by a drug resistant strain of the virus."
A spokeswoman for the Terrence Higgins Trust said: "This research reinforces the need for continued support for people with HIV in adhering to HIV medications to reduce the likelihood of resistance developing.
"This should include on-going monitoring and resistance testing.
"It once again confirms that primary HIV drug resistance is happening and that it can limit the treatment options for people newly diagnosed with HIV."
Keith Alcorn, of the National Aids Manual, said the findings showed it was important for all newly diagnosed HIV-positive patients to receive a resistance test before starting treatment.
"Without resistance testing, patients may start a drug combination to which they already have some resistance, causing it to fail.
"Treatment failure leads to further resistance and a serious narrowing of treatment options."