Image copyright Getty Images Image caption The school textbook told girls to dress modestly or risk being rejected by their friends

Malaysia's Education Ministry has said it shouldn't have published an infographic in a school textbook that said girls must protect their modesty or risk being shamed and ostracised.

The textbook, aimed at nine-year-olds, was distributed to all national primary schools in Malaysia.

A picture of the graphic was shared on social media by people who said it was encouraging victim-blaming.

Critics said it showed why better sex education was needed in schools.

The graphic tells the story of a character named Amira who protects the "modesty of her genitals" by dressing modestly, changing clothes behind closed doors and avoiding quiet places.

It then lists what would happen should Amira not follow those three steps, saying she would face shame and emotional distress, be ostracised by friends and bring shame onto her family.

Women's Aid Organisation advocacy manager Yu Ren Chung said that the graphic sexualised nine-year-olds, and placed the burden on them to avoid sexual assault.

"The infographic ignores the fact that perpetrators are the ones responsible for sexual assault," he told the BBC.

Image copyright Getty Images Image caption The textbook with the graphic was distributed to all primary schools in Malaysia

Deputy education minister Teo Nie Ching told the BBC by text message that the fact that the graphic was published showed a failure in the ministry's quality control, adding that "the general understanding on sex education is still low".

"We lacked the sensitivity needed to avoid such a mistake," she said.

The textbox hasn't been recalled but the ministry has sent out a sticker to cover up the graphic.

Ms Teo said that the ministry would consider changing the way it produces textbooks, and get experts to check the material before it is sent for printing. Currently, the writers of textbooks are teachers or lecturers who are typically "experts in the field".

Parent Action Group for Education chairman Noor Azimah Abdul Rahim told the BBC the graphic shone a light at the bigger issue of a lack of sex education in the Malaysian syllabus.

"I've always said that the reason we haven't been able to pinpoint how we should go about [sex education] is because we can't agree on a definition. One definition, which is rather extremist, is that sex education means sexual intercourse, that's all it means.

"What I advocate, what child psychologists agree on, in its milder form is what is a good touch and a bad touch.

"Until we can agree on what needs to be taught in schools, I think there will always be this disarray with the learning instruction being offered to students," she told the BBC.

The Ministry of Women, Family and Community Development said last week it was looking at possibly introducing some form of sexual education into schools.