Children should receive compulsory sex and relationships lessons in primary school, MPs have said.

Youngsters have a right to information that will help to keep them healthy and safe and should be taught the subject throughout their schooling, according to the influential Commons education select committee.

In a new report, it called for personal, social, health and economic education (PSHE) to be given statutory status in all of England's state primary and secondary schools to ensure that enough lesson time is devoted to the subject and teachers are properly trained.

Sex and relationships education (SRE) should be a "core part" of these classes.

But the committee also said that parents should retain their right to withdraw their children from lessons.

The recommendation comes amid continuing calls for sex education, and PSHE in general, to be given more importance in schools.

Campaigners have called for the subject to be mandatory, and a damning Ofsted report published in 2013 found that PSHE education was not up to scratch in two fifths of schools.

In its report, the committee said that PSHE in schools appears to have worsened over time. This situation would not be tolerated in other subjects, MPs warned, but the Government's plans for improving it are not good enough.

The latest official government guidance on SRE is 14 years old, and many people told the committee that the world is now very different - seeing changes such as the rise of social media, and new laws on same-sex marriages.

Some noted that increasingly easy access to pornography through the internet is shaping young people's behaviours - such as "sexting" and fuelling the need to reassess PSHE.

Although ministers have taken action recently to improve PSHE and SRE, these are not enough to make a difference, the report suggested.

It warned: "There is a mismatch between the priority that the Government claims it gives to PSHE and the steps it has taken to improve the quality of teaching in the subject."

The Government should formally endorse and issue supplementary advice on SRE drawn up by charities and advisory groups last year, MPs said, as well as checking that schools are publishing information about their PSHE and SRE curriculum on their website.

Under the current system, primary schools do not have to provide sex and relationships lessons beyond what is covered in the science curriculum, while local council-run secondaries have to provide SRE covering issues such as sexually transmitted diseases, the report noted. Academies do not have to offer SRE.

The committee said that there is a "lack of clarity" over the status of the subject.

" We accept the argument that statutory status is needed for PSHE, with relationships and sex education as a core part of it. In particular this will contribute to ensuring that appropriate curriculum time is devoted to the subject, to stimulating the demand for trained teachers, and to meeting safeguarding requirements."

The Department for Education (DfE) should develop a plan for introducing age-appropriate PSHE and SRE - which should be renamed relationships and sex education (RSE) - as statutory subjects in primary and secondary schools, the committee said.

The quality of classes could be measured through Ofsted inspections and student and parent satisfaction, it added.

The report also said that the DfE should clarify that primary school children should be taught the proper names for genitalia as part of the national curriculum.

Committee chair Graham Stuart said: "There is an overwhelming demand for statutory sex and relationships education - from teachers, parents and young people themselves.

"It's important that school leaders and governors take PSHE seriously and improve their provision by investing in training for teachers and putting PSHE lessons on the school timetable. Statutory status will help ensure all of this happens.

"Young people have a right to information that will keep them healthy and safe. SRE forms an important part of any school's efforts to safeguard young people from abuse, and is particularly needed to protect the most vulnerable children. PSHE builds character and resilience, and will help young people to live happy and healthy lives."

A DfE spokeswoman said: "We want to see all young people leave school prepared for life in modern Britain. This means not only ensuring that young people receive a rigorous academic education, but also helping them to develop personal and emotional wellbeing.

"High quality PSHE teaching has a vital role to play in this - giving young people a better understanding of the society around them and supporting them to make informed choices and stay safe."

The Government is working with schools and experts to ensure that young people are getting a decent education in PSHE and SRE, she said, adding that they are aware more needs to be done.

Lucy Emmerson, co-ordinator of the Sex Education Forum, said: "This inquiry has very effectively scrutinised the inconsistency of sex and relationships education (SRE) in schools.

"It is clear that many children and young people go through school without getting vital age-appropriate information about their bodies, what is right and wrong in relationships, consent and sexual health."

PSHE Association chief executive Joe Hayman said: "We warmly welcome the publication of the report following what has been a historic inquiry from an influential committee into whether the subject should get statutory status.

"Statutory status for PSHE would be a huge step forward and is a move supported by 87% of parents, 88% of teachers, 85% of business leaders, five royal medical colleges, two royal societies and over 100 expert organisations."