JAKARTA (Reuters) - Indonesia has ordered a publisher to withdraw a sex-education book for children, which addresses the subject of masturbation, for being too vulgar.

The publisher of “I Dare to Sleep Alone and I Learn to Control Myself” apologized for causing any offence but said the book aimed to help parents teach children how to protect themselves from sexual harassment.

The Education Ministry said the book, written by Fita Chakra, contained pornographic content and cited a depiction of a cartoon boy’s thoughts as he hugs a bolster pillow when he can’t sleep. It also includes a part where the boy finds a new game of putting his hand inside his trousers.

“The content of the book is not appropriate for children. It’s too vulgar,” the ministry said in a statement, adding the publisher must recall the book or face “strict sanction”.

Sex education in Indonesia, which has the world’s largest Muslim population, is uncommon and casual conversations about sex are considered taboo.

Awaluddin Tjalla, head of the ministry’s center of curriculum and books, also said the ministry was speaking to an association of publishers to urge it to take action against the publisher. He did not elaborate.

The author was not immediately available for comment, but the publisher, Tiga Serangkai, said it had consulted psychologists as well as pediatricians when compiling the book.

“Our intention in launching the book was so that we can help parents explain to children about the importance of protecting themselves ... from people with ill-intention towards them,” it said in a statement.

The book also contained educational material on sexually transmitted diseases and “basic knowledge that is important for a child to know from early age”, it said.

On its Instagram account, Tiga Serangkai said: “We understand that some in our society are not ready for sex education at an early age”, adding that those who had bought the book could return it and get a refund.

The publisher said the book had been withdrawn since December, but that it had found copies still on sale in some online stores.

Some Indonesians turned to social media to complain. An Instagram user with handler @revitatiaman said: “I’ve seen a few pages of the book and I don’t think there’s any education in here. Only damaging a child’s moral and brain.”

“It is better to soothe a kid who is learning to sleep by himself at night through reading or reciting a praying,” said @pipijippie. “For Muslims, it can be done by reading the Koran, not by introducing the kid to sexual activity.”