A lack of sex and relationships education in some secondary schools is leading to a 'ticking sexual health time bomb', town hall chiefs have warned.
The subject should be compulsory in all state secondary schools, including academies and free schools, according to the Local Government Association (LGA), arguing that it is a major health protection issue.
Council-run secondaries have to teach sex and relationships education (SRE), while academies and free schools, which are not under local authority control, do not have to follow the national curriculum and are not obliged to teach the subject.
Parents have the right to withdraw their children from the lessons in all state schools.
The LGA, which represents councils in England and Wales, said age-appropriate SRE should be an essential part of the curriculum for young people, adding that parents should still have the choice to take their child out.
It said local authorities have responsibility for public health, budgeting around £600 million a year for sexual health, and without proper SRE classes, pupils are not being properly prepared for adulthood.
Izzi Seccombe, chairman of the LGA's community wellbeing board said: "This is a major health protection issue.
"The lack of compulsory sex and relationship education in academies and free schools is storing up problems for later on in life, creating a ticking sexual health time bomb, as we are seeing in those who have recently left school."
She added that there was a "shockingly high" number of sexually transmitted infections (STIs) diagnosed in teenagers and young people.
Official figures show there were 78,066 new STI diagnoses among 15 to 19-year-olds in England in 2015, the LGA claimed, and 141,060 among 20 to 24-year-olds.
"The evidence suggests that when designed and delivered in the right way, SRE can have a really positive impact on a pupil's development," Ms Seccombe said.
"However, we are also conscious that some parents may wish to remove their children from this, which is why we are saying there should also be provision for parents to opt their children out of lessons, if they consider this to be in the best interests of their child."
A Department for Education spokesman said: "High-quality education on sex and relationships is a vital part of preparing young people for success in adult life.
"It is compulsory in all maintained secondary schools and, as the Education Secretary said recently, we are looking at options to ensure all children have access to high-quality teaching in these subjects.
"We will update the House during the passage of the Children and Social Work Bill."