TEXTBOOKS used in Indonesian primary schools have been withdrawn after they were found to contain a story about an erotic encounter in a brothel.

Outraged parents in the conservative, Muslim-majority country complained their children were being exposed to "porn'' after the discovery of the tale entitled The Shepherd Boy and Wolf Mother.

The story, in Indonesian language reading books being used by 11-year-olds, is about a man overcome with lust when he meets a woman at a brothel selling sex to support her child, who lives in her distant home village.

"In the dimly lit place where women sell their bodies, his Adam's apple bobbed up and down upon seeing the beauty of the woman,'' read the story.

"She trembled in the arms of the man, and just like the flourescent lights in the room, she felt that she herself was on fire.''

The text was lifted from a blog and reprinted in the textbooks, which were bought by schools in Bogor, a city on the outskirts of Jakarta, from street stalls for around $US3 ($3.27).

Parents from two schools in the conservative area sent letters of complaint to local authorities, who responded by sending out a letter ordering schools not to use the book.

"The story in the book read like a porn story,'' Ajwar, a parent of a child who was given the book, was quoted as saying in the Jakarta Globe newspaper.

A spokesman for the city authorities explained schools bought the book of their own accord without seeking permission for education chiefs.

"The book is not on the curriculum - the schools just asked parents to buy the books,'' spokesman Arie Harsono said. "In such cases, they are supposed to seek permission from the education office first.''

Two other books on reproductive health have been banned this year in other parts of the main Java island for showing images of sexual intercourse and alluding to abuse and infanticide.