Many schools are failing to give pupils adequate sex and relationships lessons, which could leave them open to sexual exploitation or inappropriate behaviour, inspectors have warned.

Secondary school pupils should learn more about pornography, relationships, sexuality and staying safe, rather than just the "mechanics" of reproduction, Ofsted said.

It also criticised primary schools for spending too much time teaching pupils about friendships and relationships, leaving them ill-prepared for puberty.

In a damning report, the schools watchdog said that in a sizeable proportion of England's schools personal, social, health and economic (PSHE) education was still not good enough.

Sex and relationships education needs to be improved in more than a third of schools, Ofsted said.

"In primary schools this was because too much emphasis was placed on friendships and relationships, leaving pupils ill-prepared for physical and emotional changes during puberty, which many begin to experience before they reach secondary school," the report argues.

"In secondary schools it was because too much emphasis was placed on 'the mechanics' of reproduction and too little on relationships, sexuality, the influence of pornography on students' understanding of healthy sexual relationships, dealing with emotions and staying safe."

It adds: "Lack of high-quality, age-appropriate sex and relationships education in more than a third of schools is a concern as it may leave children and young people vulnerable to inappropriate sexual behaviours and sexual exploitation. This is because they have not been taught the appropriate language or developed the confidence to describe unwanted behaviours or know where to go to for help."

Ofsted's report found that most secondary schools cover topics such as puberty, reproduction, sexually transmitted infections, contraception, abortion and pregnancy in PSHE lessons, but there was "less emphasis on sexual consent and the influence of pornography".

"The failure to include discussion of pornography is concerning as research shows that children as young as nine are increasingly accessing pornographic internet sites, and ChildLine counsellors have confirmed an increase to more than 50 calls a month from teenagers upset by pornography," inspectors said.

Ofsted's report also found that some pupils believed their PSHE lessons had avoided discussing controversial topics such as sexual abuse, homosexuality and pornography.

It also raises concerns about children's safety, suggesting that while schools have a statutory duty to safeguard their students, there were few examples of schools helping children and young people to protect themselves from unwanted physical or sexual contact or sexual exploitation.

Ofsted's findings come just weeks after teachers called for pupils to be given lessons on the dangers of pornography.

The Association of Teachers and Lecturers passed a resolution at its annual conference that warned that schools must ensure that pornography does not become seen as so normal that youngsters expect it to be part of everyday life.

Teachers should be given training on how to deliver lessons on the dangers of pornography as part of sex and relationships classes, the union said.

Overall, the report – based on 50 school inspections and a survey of 178 young people – found that PSHE education requires improvement or is inadequate in 40% of schools.

In March, education minister Liz Truss announced that PSHE would remain a non-compulsory subject, saying it should be down to schools and teachers to decide on the topics covered in lessons.

She said the government was giving funding to the PSHE Association to allow it to work with schools to develop their own curriculum for the subject. The PSHE Association said it was "very pleased" it would receive the grant, although the funding was "significantly reduced".