An elderly village witch doctor in Indonesia entrapped a 12-year-old girl and tricked her into having sex with him for the next 15 years by claiming to be possessed by the "jin", or spirit, of a young boy, police have said.

Key points: Police found the woman in a rocky crevice in a jungle

Police found the woman in a rocky crevice in a jungle The witch doctor allegedly convinced her he was possessed by the spirit of a young boy

The witch doctor allegedly convinced her he was possessed by the spirit of a young boy The man faces up to 15 years in prison

The woman, an identified by police as "H", was rescued on Sunday in Tolitoli regency, in Central Sulawesi province.

Acting on a tip-off, police said they had found the woman, who was now aged 28, in a rocky crevice in a jungle near Bajugan village, where she had been held during the day since her disappearance in 2003.

Police located the woman in this rocky crevice in the jungle. (Supplied: Tolitosi Police)

At night, police said she stayed in a hut near the house of the 83-year old man, identified by police as JG.

Central Sulawesi Police Chief Muhammad Iqbal Alqudusy said the man had shown the girl a picture of a boy named Amrin "who she thought was her boyfriend".

"She was led to believe that Amrin's spirit had entered [the elderly man's] body," Mr Iqbal said.

"It is obvious that he was satisfying his lust."

Indonesia is a predominantly Muslim country but old beliefs about spirits and other paranormal activity are still held by some.

Mr Iqbal later said the woman said she had been having intercourse with "Jin Amrin" since 2003 "but she was really having sex with JG".

The man, he said, admitted to sexual relations since 2008.

H was found and rescued by officers from the Tolitoli precinct. (Supplied: Tolitoli Police)

Police said they found the woman after her sister alerted neighbours she was nearby.

According to The Jakarta Post, the sister was married to the son of the shaman, known for his traditional healing methods and abilities to channel spirits.

The man explained the victim's disappearance to her parents by saying she had gone to Indonesia's capital, Jakarta, to work, the newspaper reported.

The man has been charged with offences under Indonesia's child protection laws, which carry a maximum sentence of 15 years in prison.

Reuters/ABC