Scotland has become the first place in the UK where a drug that aims to prevent HIV will be available on the NHS.
The drug, PrEP, has been approved by the Scottish Medicine Consortium (SMC) and has been shown to reduce the risk of infection in people who are high risk by more than 90%.
Campaigners who had fought for the drug to be made available welcomed the decision, saying Scotland had "made history".
They say PrEP is a "vital opportunity" to reduce the number of new HIV cases.
Dr Alan MacDonald, SMC chairman, said the drug "when used together with safer sex practices may help to reduce the spread of HIV".
The NHS in England has announced a large scale clinical trial of the drug, which has the brand name Truvada, in 2017-18.
HIV Scotland, the Terrence Higgins Trust Scotland, Waverley Care and NAT (National Aids Trust) campaigned for the drug to be made available in the PrEP4Scotland Coalition.
The group said in a statement: "We applaud the SMC for taking this bold step to tackling HIV in Scotland.
"PrEP provides opportunities to reinvigorate how people at higher risk of HIV exposure engage with testing and prevention opportunities, and it is a vital opportunity to make a real reduction in the number of new HIV transmissions."
NAT chief executive Deborah Gold said the "game-changing prevention tool has the potential to massively reduce HIV rates and turn Scotland into a model internationally of how to do HIV prevention well".
Robert McKay, national director for the Terrence Higgins Trust Scotland, said: "Today, Scotland has made history in the fight against the HIV epidemic.
"PrEP can now be used as a vital tool - alongside condom use, regular testing and early treatment - to help bring an end to HIV transmission in Scotland.
"Not only will this make a life-changing difference to individuals by protecting them from a lifelong and stigmatised condition, but for every person who would have become HIV positive without PrEP, NHS Scotland will save £360,000 in lifetime treatment costs."
Gordon Garioch, 53, from Aberdeen, who is taking a generic version of the drug which he buys online, said: "For me PrEP is a reassurance - I used to worry all the time. I have always been cautious, but some of my friends have been cautious and got HIV.
"Taking PrEP has allowed me to take control of my sexual health, and therefore both my physical and mental health.
"I feel by taking PrEP I am being responsible to myself, but I am also being responsible to my sexual partners."