The cream appears to disable the virus' ability to replicate
US scientists say they have developed a cream which could for the first time prevent someone from becoming infected with genital herpes.
The virus is carried by half a billion people worldwide - the disease can be controlled, but it is hard to stop it spreading to others through sex.
This topical treatment, which has so far been tested only on mice, stops the virus from replicating in a new host.
The research appears in the journal Cell Host and Microbe.
The type-2 herpes simplex virus is sexually transmitted and can cause painful, fluid-filled blisters to develop.
It can also be passed from mother to child during childbirth, putting the infant at risk of brain damage and even death if left untreated.
The cream, developed at Harvard Medical School, uses a technique called RNA interference, which stops the genes the virus needs to replicate from working properly.
"One of the attractive features of the compound we developed is that it creates in the tissue a state that's resistant to infection, even if applied up to a week before sexual exposure," said Professor Judy Lieberman, who led the research.
"This aspect has a real practicality to it. If we can reproduce these results in people, this could have a powerful impact on preventing transmission."
Gynaecologist Dr Gillian Vanhegan said the cream sounded "very interesting indeed".
"Obviously you would have to know when to use it - but it could definitely be of value to people with a partner who was carrying the virus."
Dr Nathan Sankar, a consultant in genitourinary medicine at the UK's Newcastle General Hospital, said it was an "exciting" development but warned there was still a long way to go.
"It is still at the very early stages. In many ways a vaccine which could be taken and forgotten about would be better, but the cream is definitely promising."
As well as looking into whether the cream can be developed for human use, the team is investigating whether the same principles can be applied to protection against HIV/Aids.