The Thean Hou temple decorated with red lanterns

A Malaysian Taoist medium has died while performing a "human steaming" stunt which involved him sitting on top of a bubbling wok covered by a giant metal lid, police said Wednesday.

Lim Ba, 68, suffered a heart attack and burns after attempting to perform the elaborate ritual during a Taoist festival at a Chinese temple late Monday.

Devotees witnessing the event, which involved Lim sitting on a wooden platform balanced on top of the bubbling wok, heard banging noises emanating from the metal lid after about half an hour.

Witnesses at the event, including Lim's son, reportedly saw the lid moving and then found the victim unconscious when they removed the lid.

Local police chief Mohd Ismail Ibrahim told AFP that the ritual Lim performed on Monday was not his first, but turned out to be his last.

"He did this ceremony many times where he got into the wok to show that he was immune," to the heat, he said. 

"He had a heart attack and he collapsed. He was knocking (on the lid), and the water from the wok burned him," he added.

Lim was pronounced dead at the scene in the Kuala Sanglang temple in northern Kedah state.

Lim had been reportedly been performing the stunt for 10 years and food such as sweet corn and buns would usually be steamed alongside him.

Monday's performance was part of the Taoist "Nine Emperor Gods Festival", although his family had objected to Lim carrying it out as he had undergone heart surgery last year.

"My father went through a heart operation last year. I didn't think this ceremony would be his last," Lim's son Lim Kang Huai told Bernama.

It is not unusual for acts depicting immense physical strength and endurance to be performed at festivals in multi-ethnic Malaysia, such as walking over glass shards.

Ethnic Chinese make up a quarter of Malaysia's 31 million inhabitants, with the majority of them following Taoism -- a philosophical and religious belief system rooted in Chinese customs -- or Buddhism.

About 60 percent of Malaysia's population is Muslim.