"Much-maligned" school sex education has been praised for promoting responsible attitudes in 15-year-olds.
Research into the health behaviour of 2,500 teenagers shows teachers are doing an effective job in providing information about the threat of Aids and other sexually transmitted diseases.
They are also giving pupils more opportunities to talk about sex and relationships.
Martin Raymond, deputy director of the Health Education Board for Scotland, said many young people criticised sex education but the evidence proved they pick up vital information.
Boys of 15 are less likely to have sex now than they were four years ago while girls of the same age are no more likely. Thirty-one per cent of boys report having sex compared with 37 per cent in 1994.
Eighty per cent of boys also said they used condoms the last time they had sex, a "dramatic 13 per cent increase" over four years.
Mr Raymond suggested teachers should continue to focus on girls since they tended to have sex with older boys. "There is a need for girls to be empowered and assertive," he said.
Parents do make a difference when they talk to their children about sex, according to the Edinburgh University study.