The pill, Truvada, combines two AIDS drugs and people who take it are 86 percent less likely to get HIV, according to the study.
A study has shown that a pill currently being used to treat HIV could serve to prevent the disease if taken before and after unprotected sex.
The pill, Truvada, combines two AIDS drugs and people who take it are 86 percent less likely to get HIV.
The study, done in France and Canada, was conducted on 400 gay men who were given fake or real Truvada and told to take two pills from two to 24 hours before sex, a third pill 24 hours later, and a fourth pill 48 hours after the first dose. The men also were given condoms and disease prevention counseling.
The study was stopped in November 2014 after researchers saw that the drug was working with nausea and diarrhoea being the only major side effects.
During the duration of the study, only two men, who stopped using the pills after more than a year, were infected with HIV.
"That impressed me," Dr Scott Hammer, an AIDS specialist at Columbia University in New York said.
Dr Susan Buchbinder, an AIDS specialist at the San Francisco Department of Public Health, said the results were exciting but warned that they might not apply to male-female sex, because different types of sex expose partners to differing amounts of virus.
The study of Gilead Science's Truvada was led by the French national HIV research agency.