AN experimental AIDS vaccine has protected people for the first time, reducing the rate of infection by about 30pc.
Researchers said that the new formula was made from two older versions.
Scientists said they are unsure how or why the vaccines worked and will study the volunteers in the trial to find out.
However, there was agreement that the vaccine's immediate usefulness may be limited and a commercial vaccine would be years away.
"It's the first time in the world that we have found a vaccine that can prevent HIV infection," said Thai Health Minister Withaya Kaewparadai.
The vaccine is a combination of Sanofi-Pasteur's ALVAC canary pox vaccine and the failed HIV vaccine AIDSVAX, made by a San Francisco company called VaxGen.
The trial was sponsored by the US government and conducted by the Thai Ministry of Public Health. Officials from the two countries told a news conference in Bangkok the risk of infection had been cut by 31.2pc among 16,402 volunteers.
The results were a triumph for supporters, who went ahead with the giant trial despite criticism it was unethical or a waste of money because the vaccine was expected to have no effect.
"Myself, like others, did not think there was a very high chance that this would give any degree of efficacy," said Dr Anthony Fauci of the US National Institute of Allergy and Infectious Diseases, which paid for most of the $105m (€72m) study. "But nonetheless, we went ahead with the trial."
"What is needed here is more in-depth analysis," Sanofi's Jim Tartaglia told a briefing.
Dr Donald Francis of Global Solutions for Infectious Diseases, owners of VaxGen said the companies had limited amounts of vaccine left to test and would have to make more.
Dr Fauci said the team was confused because people who got the vaccine and who became infected anyway had just as much virus in their blood and just as much damage to their immune systems as unvaccinated HIV patients.
That meant the vaccine helped prevent infection but did nothing to affect the virus once it is in the body.
"We had 74 infections in the placebo group and 51 in the vaccine group," said Dr Jerome Kim, a US Army colonel at the Walter Reed Army Institute of Research in Maryland, who helped lead the trial. "Although the level of protection that we saw was clearly modest, the study is a major scientific advance," Dr Kim said.
"It is the first evidence that the development of a safe and effective vaccine is possible. Although we don't have all the answers now, it does have important implications for the future of HIV vaccine design."