He has a monkey on a chain. And an owl - also chained. Teven Say, a master of magical tattoos, strokes both of his familiars and regards me with a proud gaze. He is sitting in a large shed in Siem Reap, Cambodia. Stripped to the waist, his muscular torso is webbed with ink. Tangled outlines of gods and sacred geometry weave around his fists and arms like wires in a fuse box, pulsing with an ancient magic.

One of his students connects a tattoo gun to a battery pack. Teven Say dips the needle in black ink and tells me to lay down. I start sweating.

Magical tattoos, known as sak yant in Khmer - the language of Cambodia - are believed to render their wearers impervious to bullets, protect them from misfortune and endow them with sexual magnetism. While the tradition prevails throughout Southeast Asia, little is known about the art in Cambodia, partly because of a 1920 royal ordinance that forbade monks from tattooing and partly because the remaining practitioners were killed during the Khmer Rouge genocide and civil war. Today, traditional Cambodian sak yant is especially difficult to find because those who are still practising the art form are reluctant to publicise their activities.

"Cambodians are protective of tattoo designs," says American journalist Ryun Patterson, whose book, Vanishing Act: a Glimpse into Cambodia's World of Magic, was released this year, "because they think they're very powerful and can be misused if given to the wrong person."

Teven Say is among the handful of tattoo masters left. He and others I meet describe arduous treks through the war-scorched kingdom searching out the last remaining holders of this torn tradition. They collect tattoo designs into personal grimoires and learn the occult techniques needed to transfer power into the designs.

"I meditate every day," says Teven Say. "When I tattoo, I recite a secret mantra I learned from a hermit in the jungle."

Chan Tra, a sacred tattooist in Phnom Penh, follows eight holy precepts (three more than those ascribed to Buddhist laypeople) in order to keep himself a pure conduit for magical power. Inside his single-room shop, the walls are covered with designs: Brahmanic deities with swarming arms, geometric shapes (known as yantras) and swirling spells.

"My grandfather was a tattooist," he says, absent-mindedly pressing a finger to the tip of a traditional bamboo needle. "But he was killed by the Khmer Rouge, so I found those monks who still had copies of the designs and learned them. That was 20 years ago."

WHEN TEVEN SAY PUTS his needle to my back I feel a burning sensation. He could have used the traditional bamboo needle but apparently the power remains the same regardless of the instrument. So I chose the gun because it is quicker and more accurate.

He begins searing the sign for the divine mother, with its Swiss-roll swirl and three peaks, onto my left shoulder blade (the left side is the feminine side, associated with compassion). Audible above the tattoo gun's buzz is the oddly comforting mantra he is muttering. In the endless forgotten past, before Southeast Asia was so called, people of my age were feeling the same burn and hearing similar comforting chants.

The chants heard by initiates of the aboriginal tribes that populated south China and Southeast Asia from the first millennium BC were different but also served a sacred purpose. In animistic cultures, all things are imbued with spirit and therefore sacred. Their tattoos are mentioned by Sima Qian, China's grand historian of the Han dynasty, who wrote, in the first century BC, that they "cut their hair and tattooed their bodies".

Shamans dreamed designs and watched them bloom from the tips of bamboo needles - giving tribal members " sak" was their sacred duty. The word " sak", meaning to "prick" or "jab", survives to this day. Indeed, Bangkok-based writer Joe Cummings, whose book, Sacred Tattoos of Thailand, was released in 2011, explains that the word occurs in several languages spoken by the indigenous tribes of Southeast Asia, suggesting it comes from an older root language.

It's clear that sacred tattoos existed long before the first Indian trading ships arrived in Southeast Asia, in around 200BC, beginning a period called "Indianisation", when Buddhism, Brahmanism and animism bubbled in the seething mindscapes of the region for thousands of years. Eventually sak yant emerged.

Experts disagree about how this happened. Zhou Daguan, a Chinese diplomat who visited the ogival towers of Angkor in 1296, noted that the king was protected from arrow and sword wounds by takruts - tiny cylinders made from leaves of rolled metal inscribed with prayers and inserted beneath his skin (a similar practice persists in rural Cambodia: a shaman I met last year wrote mantras on thin metal leaves, rolled them up and threaded them on string, to make a protective charm). According to the late scholar of Cambodian Buddhism Ian Harris, there is a design that bears similarities to today's sak yant engraved on one of the foundation stones of Angkor's Bat Chum temple. It features 48 syllables arranged on a lotus blossom.

But there's no evidence that the Brahmanic Angkor civilisation - which flourished between the ninth and 15th centuries - was the place where indigenous tattoo practice married with the Indian sacred imagination to create sak yant, even if similar practices did exist. Although temples in Thailand depict tattooed people, nothing similar has been found in Cambodia.

"If Angkor subjects were inking up, there ought to be a written record somewhere," says Cummings.

Some researchers maintain that the early, Indian-influenced civilisations of Southeast Asia are the most likely origin of sak yant.

"It is likely that [tattooing] is an indigenous form that developed with Indian interaction," says Jonathan H.X. Lee, associate professor of Asian American studies at San Francisco State University, in the United States.

Could it be that the holy chants of the tattoo master once echoed in the stone corridors of Angkor?

In another time and place, a holy tattooist chanted softly as he focused on the ink and blood-blatted back of Angelina Jolie. It was 2004 and the American actress was celebrating being offered Cambodian citizenship by getting a sak yant of a Bengal tiger. Jolie has two holy tattoos (the other is a Buddhist prayer rendered in Khmer script on her left shoulder). Through her patronage, the spirits of sak yant have emerged into the global consciousness. Now they are coveted by fashionistas, but Thai traditionalists raised concerns earlier this year about Westerners getting sak yant with little regard for their spiritual significance.

"Today it's about fashion," professor Sukanya Sujachaya, former director of the Centre of Folklore Research at Bangkok's Chulalongkorn University, told news agency Agence France-Presse. "But this type of tattoo cannot be sold just for its beauty. It also has to be for the belief."

In Cambodia, too, getting inked involves a serious spiritual commitment. Traditionally, it included a period of mentoring with the tattoo master, during which the initiate was trained how to live a good life. If the rules are respected, the tattoo remains powerful. Sak yant initiates are expected to abide by the five Buddhist precepts for laypeople: no killing, stealing, lying, intoxicating the mind and using sexual energy to harm. Other rules are added depending on the master and can include dietary prohibitions and a ban on kissing your wife below the waist (based on the Asian belief that the lower half of the body is unclean).

"When I got my tattoo [from a Cambodian monk in 2011], it was only after a long, stern lecture on how this was a very serious endeavour," Patterson says. "I had to commit to following the terms of the magical contract I was entering into."

TEVEN SAY LAID OUT the rules before he began. I needed to abide by the five precepts and also not eat dog or snake meat (mercifully, the rule about below-waist kissing was omitted). The tattoo gun's buzz starts again, the sound coming from my right shoulder. Teven Say scorches down the symbol for the divine father (the right side is associated with masculinity and wisdom). He and his students are not concerned about giving sak yant to foreigners.

"We want to tattoo foreigners so the tradition spreads around the world," says Arjar Tar, one of Teven Say's students, whose ripped torso is a sketchbook of traditional designs. "But if they don't follow the rules it's bad luck for them."

One person who believed in the power of sak yant was Lon Nol, the Cambodian politician and general who led a coup against Prince Norodom Sihanouk in 1970. Towards the end of his five-year reign, his behaviour became increasingly Macbethian. As the soldiers of the Khmer Rouge bore down on his Phnom Penh stronghold, the capital's pagodas became factories where monks produced magical undershirts - spiritual body armour covered in magic symbols - to protect his army. Lon Nol also encouraged soldiers to get tattoos so the power of the Buddha could enter their flesh. By 1975, when Khmer Rouge bullets began to hit the capital, according to Harris, he was spending US$20,000 a month on astrological consultations.

Deposed by the victorious communists, Lon Nol fled into exile. The turmoil that followed meant the demand for protective tattoos remained, despite efforts by the Khmer Rouge to stamp out the practice. General Nhek Bun Chhay, who commanded the royalist forces during the civil war of the 1980s, still believes in the power of holy ink.

Inside his office, Nhek Bun Chhay - a stocky, wide-faced man - sits with a handful of staff. Now 57, his tattoos are faded like the photos on his wood-panelled walls.

In the early 80s, when he was a young soldier, he spent a year serving as a real-life sorcerer's apprentice. At the end of his training, his master blessed him with several tattoos. Along his jawline, mantras in Pali - the liturgical language of Theravada Buddhism - were inked to give his voice the power of command; a sak yant on his arm was intended to give him the strength of seven elephants; and a net design on his chest and back protects him against all kinds of danger. His mentor, like most if not all of Cambodia's wizards, has since died. Nhek Bun Chhay laments the dying out of a power that he believes saved his life.

"During wartime, many people had magic tattoos," he says. "But now it has decreased; people do it for art but they have forgotten how to put power into the designs."

Over the border in Thailand, the tradition of sacred tattoos (also called sak yant) is as tough as the jungle vines. Lineages that stretch back hundreds of years continue to hold people's imaginations. But, in Cambodia, the lineages have been badly damaged.

"I couldn't find a single tattoo master with a real lineage [in Cambodia]," says Cummings. Now it is up to artists such as Teven Say and Chan Tra to nourish what is left in the hope sak yant can again grow into something relevant.

IN PHNOM PENH, Chan Tra is finishing a Phutson sak yant (" Phut" stands for Buddha and " son" means layering) design on my arm - my third after the two I received from Teven Say in Siem Reap. Afterwards, Chan Tra takes three fragrant incense sticks and circles the fresh tattoo, praying feverishly in Pali. A rattling fan swings from side to side, causing the designs stuck on the wall to flap slightly. He makes me promise to return on the next full moon, to make an offering to the spirits of sak yant.

Chan Tra finishes the blessing by blowing on the design, activating it.

"What you must understand is that these tattoos have real power," he says. "They really can protect you from accidents and danger, and bring you luck."