The Scottish Government has announced it will implement a HPV (human papillomavirus) vaccination programme for boys, following a committee report.
Currently, the vaccination is offered to S1 to S3 girls, protecting against a virus that causes cervical cancer.
The Joint Committee on Vaccination and Immunisation had advised extending immunisation to boys of the same age.
Last year, the injection began to be offered to men up to the age of 45 who have sex with other men.
HPV is the name given to a large group of viruses, which can be caught through any kind of sexual contact with another person who already has it.
Public Health Minister Joe Fitzpatrick said the programme, in conjunction with Health Protection Scotland and NHS Scotland, will begin as soon as it is practicable.
He added: "I am pleased to announce that the Scottish government will implement a HPV vaccination programme for adolescent boys in Scotland.
"We know from the recommendations made by the Joint Committee on Vaccination and Immunisation that this will help reduce diagnoses of HPV-related cancers and save lives in years to come."
Doctors say most HPV infections go away by themselves, but sometimes infections can lead to a variety of serious problems.
Campaigners have argued that offering the injection to boys would further reduce the risk of HPV and used examples of other countries, like Australia, who have offered gender-neutral programmes.
The Joint Committee on Vaccination and Immunisation report states: "If considering a cost-effectiveness analysis where a combined girls' and boys' programme is compared to no vaccination, gender-neutral HPV vaccination is highly likely to be cost-effective."
David Cross, vice-chairman of the British Dental Association's Scottish Council said HPV can lead to oral cancer and this claims more lives in Scotland than car accidents.
He added: "Oral cancer rates in Scotland are double those in England, and people from our most deprived communities are up to three times more likely to be affected.
"HPV is a key risk factor, and this year 30,000 boys in Scotland have gone unprotected."