An HIV-positive person who takes anti-retroviral drugs after diagnosis, rather than when their health declines, can cut the risk of spreading the virus to uninfected partners by 96%, according to a study.
The United States National Institutes of Health sampled 1,763 couples in which one partner was infected by HIV.
It was abandoned four years early as the trial was so successful.
The World Health Organization said it was a "crucial development".
The study began in 2005 at 13 sites across across Africa, Asia and the Americas.
HIV-positive patients were split into two groups. In one, individuals were immediately given a course of anti-retroviral drugs.
The other group only received the treatment when their white blood cell count fell.
Both were given counselling on safe sex practices, free condoms and treatment for sexually transmitted infections.
Among those immediately starting anti-retroviral therapy there was only one case of transmission between partners.
In the other group there were 27 HIV transmissions.
"This breakthrough is a serious game changer and will drive the prevention revolution forward. It makes HIV treatment a new priority prevention option," said Michel Sidibe, executive director of the Joint United Nations Programme on HIV/Aids (UNAIDS).
But he warned that it would cost more than ten billion dollars to provide drugs to the ten million people worldwide who are currently not receiving medication for HIV.
The World Health Organization says sexual transmission accounts for 80% of all new HIV infections. Its director general, Dr Margaret Chan, described the announcement as a "crucial development"
She added: "The findings from this study will further strengthen and support the new guidance that WHO is releasing in July to help people living with HIV protect their partners."
The value of anti-retrovirals, in preventing transmission, had been speculated for some time after observational studies, but researchers say this is the first time it has been proven in clinical trials.
Keith Alcorn, from the NAM, an HIV/AIDS charity, said: "This study resoundingly confirms what lots of smaller studies have been telling us for several years.
"International donors cannot ignore the evidence any longer: HIV treatment is a very powerful form of HIV prevention, and could have a major effect on the HIV epidemic in the worst-affected countries.
"What we need now is a renewed commitment to HIV treatment, and studies to show how to get the maximum benefit out of this breakthrough at country level."