Every 35 days, Muslims from across Indonesia flock to a hilltop Islamic shrine in central Java. They come to find blessings and good fortune — through a ritual that involves adulterous sex.

When they arrive at the shrine, known as Gunung Kemukus, they offer prayers and flowers at a sacred grave. Then, they find a stranger for anonymous sex.

When I arrive there, darkness is starting to shroud the hillside. By candlelight, people are sitting on mats around sacred dewadaru trees and amidst the twisting roots of massive fig trees. There are lots of women standing by themselves and lots of men in groups.

Pak Slamat is one of the men. He is balding, has a moustache, wears a leather jacket and glasses, and is reading from the Koran. He's married, but hasn't told his wife he is here because she wouldn't let him come. She thinks he has gone somewhere to pray.

"In all the rooms around here there are couples," he says. "They are small business people and, if you ask them, they say it works — that before business was slow and now it's good. This is the work of Allah, through our traditional ways. I am keen to do the ritual; it's just a matter of finding someone who wants the same thing."

Like tens of thousands of others, Slamat has come to be blessed in a ritual that dates back hundreds of years. The ritual's origin is a legend about a young prince, Pangeran Samodro, who was raised in the court of Demak, a Muslim sultanate on Java’s north coast, and fell in love with his stepmother, Nyai Ontrowulan. The two ran off to Gunung Kemukus, where they were discovered by soldiers from Demak and slain. Their bodies are supposedly in a grave at the shrine.

According to some versions of the story, the couple didn't finish having sex before they were discovered, so the ritual sex completes their union. In another version, the ritual helps minimize the shame of their act by offering a more shameful act. Regardless, many believe that coming to Gunung Kemukus provides a blessing that can boost your fortune — an incentive that seems to have special appeal for needy workers, like bus drivers, farmers or small-market traders.

Ibu Winda is a grandmother in her early 60s and is dressed in a gold jacket with flowers, a short mini-skirt and leather jacket. For makeup, she wears bright red lipstick and has powdered her face.

She runs a small food stall in her hometown and has been coming here for 10 years. "Ever since I have come here, business has been good and life as been easier, praise be to Allah," she says.

At 10 pm, it's very dark and the area around the grave is full of older people — some women with headscarfs, others with barely any clothes on and a lot of middle-aged men in leather jackets. Everyone is starting to pair up now underneath the trees.

This ritual isn't Islam as most would recognize it. It is a mix of Islam with earlier Hindu, Buddhist and traditional beliefs — something that is typical in Indonesia, and especially Java.

"Indonesia is amazing because whatever religion comes into Indonesia, it changes its color," says Kunijoro Soeparno, a professor of sociology who’s been researching these traditions for decades.

"The Islam is not just Islam like it is in Arab countries. Hinduism is different here to what it is in India. Buddhism is different from China. The Catholic Church is different from in Rome," he says.

As a whole, Indonesia is steadily shifting toward more orthodox Islam. In spite of that, though, the ritual on Gunung Kemukus is exploding in popularity.

Local government officials have been trying to promote a G-rated version of the ritual in recent years, without the sex — one that is more in line with mainstream Islamic beliefs. But, so far, it has not been willing to outlaw the practice.

"It used to be very different," says Professor Soeparno. "Before, people would really have ritual sex, but they were having sex out in the open. And the local government decided that was not a good idea, so they built bamboo huts around the shrine. But as a result, prostitution grew."

Professor Soeparno estimates that about half of the women who show up here are now commercial sex workers. He estimates another 25 percent are part-time sex workers, like 27-year-old Liat.

"I am just a normal housewife," she says. "I have a 3-year-old daughter, but my husband doesn't earn enough to support our family. We are always fighting, so I decided to do this. I do it here because this is a special place."

As prostitution has grown, so has the number of detractors. When rumors spread recently that the Islamic Defenders Front, a radical Islamic group, was going to raid Gunung Kemukus, the police showed up in force to protect the hill.

Alongside the shrine is a thriving row of karaoke bars. Under the cover of darkness and the cloak of religion, Gunung Kemukus is a place where people can do things they couldn’t do anywhere else.

Divorced housewife Ibu Fitri has left her 3-year-old daughter with her mother in a nearby village and has come up to the mountain for a Friday night out. She has hooked up with a man named Isham, who says he is here because business is slow and he needs some spiritual help.

“This is my first time," she says, laughing. "I didn’t consciously come here looking for someone, it just happened. I came here by myself. I just felt like getting out of the house and I have ended up with him."

It’s 1 am when I check on Pak Slamat to see if he’s found a partner. When I find him, he is still near the grave, praying alone.

"I am looking for someone with a good heart," he says, "someone with the same mission as me for our business, otherwise it’s not good."

He strokes my leg. "Unless you want to be the one," he whispers.