Image copyright Joshua Paul for the BBC

It was a quiet Friday morning last July when pandemonium broke out at a school in north-east Malaysia. Siti Nurannisaa, a 17-year-old student, was at the centre of the chaos.

This is her account of what happened.

The assembly bells rang.

I was at my desk feeling sleepy when I felt a hard, sharp tap on my shoulder.

I turned round to see who it was and the room went dark.

Fear overtook me. I felt a sharp, splitting pain in my back and my head started spinning. I fell to the floor.

Before I knew it, I was looking into the 'otherworld'. Scenes of blood, gore and violence.

The scariest thing I saw was a face of pure evil.

It was haunting me, I couldn't escape. I opened my mouth and tried to scream but no sound came out.

I passed out.

Siti's outburst triggered a powerful chain reaction that ripped through the school. Within minutes students in other classrooms started screaming, their frantic cries ricocheting through the halls.

One girl fainted after claiming to have seen the same "dark figure".

Image copyright Joshua Paul for the BBC

Classroom doors slammed shut at the Ketereh national secondary school (SMK Ketereh) in Kelantan as panicked teachers and students barricaded themselves in. Islamic spiritual healers were called to perform mass prayer sessions.

By the end of the day, 39 people were deemed to have been affected by an outbreak of "mass hysteria".

Mass hysteria, or mass psychogenic illness, as it's also known, is the rapid spread of physical symptoms such as hyperventilation and twitching among a substantial group of people - with no plausible organic cause.

"It is a collective stress response prompting an overstimulation of the nervous system," says American medical sociologist and author Robert Bartholomew. "Think of it as a software problem."

The mechanisms behind mass hysteria are often poorly understood and it is not listed in the DSM - the manual of mental disorders. But psychiatrists like Dr Simon Wessely from King's College Hospital in London view it as a "collective behaviour".

"The symptoms experienced are real - fainting, palpitations, headaches, nausea, shaking and even fits," he says. "It is often attributed to a medical condition but for which no conventional biomedical explanation can be found."

Transmission, he adds, "is largely due to psychological and social factors".

Image copyright Joshua Paul for the BBC

Outbreaks have been recorded around the world, with cases dating back as early as the Middle Ages. Incidents in Malaysia were particularly prevalent among factory workers during the 1960s. Today it largely affects children in schools and dormitories.

Image copyright JOSHUA PAUL FOR THE BBC Image caption One of many mosques in the town of Ketereh

Robert Bartholomew spent decades researching the phenomenon in Malaysia. He calls the South East Asian country "the mass hysteria capital of the world".

"It is a deeply religious and spiritual country where many people, especially those from rural and conservative states, believe in the powers of traditional folklore and the supernatural."

But the issue of hysteria remains a sensitive one. In Malaysia, cases have involved adolescent girls from the Malay Muslim ethnic majority more than any other group.

"There's no denying that mass hysteria is an overwhelmingly female phenomenon," says Mr Bartholomew. "It's the one constant in the [academic] literature."

Image copyright Joshua Paul for the BBC

Surrounded by lush green rice fields, the sleepy Malay village of Padang Lembek sits on the outskirts of Kelantan's capital Kota Bharu.

It's a small, tight-knit community where everyone knows each other, the sort of place that would make many Malaysians reminisce about how their country used to be. There are family-run restaurants, beauty salons, a mosque and good neighbourhood schools.

Image copyright JOSHUA PAUL FOR THE BBC Image caption Siti's family at their home in Padang Lembek

Siti and her family live in a modest, single-storey terrace house, easily distinguishable by its weathered red roof and green exterior. An old, sturdy motorbike she shares with her best friend Rusydiah Roslan, who lives nearby, is parked outside.

"We rode it to school on the morning I was possessed by 'spirits'," Siti says.

Image copyright Joshua Paul for the BBC

Like any other teenager, stress affects Siti. She says she felt it most during her final school year in 2018, when all-important examinations loomed.

"I was preparing for weeks, trying to memorise my notes but something was wrong," she says. "It felt like nothing was going into my head."

The incident at school during the July study period left Siti unable to sleep or eat properly. It took her a month of rest before she returned to her - almost-regular - self.

An outbreak of mass hysteria usually begins with what experts call an "index case", the first person to become affected.

In this story, that is Siti.

"It doesn't happen overnight," says Robert Bartholomew. "It starts with one child and then quickly spreads to others because of an exposure to a pressure-cooker environment of stress."

And all it takes is a major spike in anxiety in a group situation, like seeing a fellow classmate faint or have a fit - to trigger a reaction in another person.

Image copyright Joshua Paul for the BBC Image caption Siti compares her experiences with spirits as having her "eyes covered"

Rusydiah Roslan will never forget seeing her best friend in that state. "Siti was screaming uncontrollably," she says. "No one knew what to do. We were afraid to even touch her."

The girls have always been close but the events of the past year have strengthened their bond. "It helps us to talk about what happened," Rusydiah says. "It helps us to move on."

From the outside, SMK Ketereh looks like any other Malaysian high school. Giant trees shade its premises and its walls have fresh coats of grey and bright yellow paint.

Makcik (aunty) Zan runs a popular stall across the street selling local rice dishes. She was preparing food a year ago, on that humid July morning, when she heard screams.

"The cries were deafening," the elderly vendor says as she serves up dishes of grilled mackerel, yellow curry and steaming glutinous rice.

Image copyright JOSHUA PAUL FOR THE BBC Image caption The SMK Ketereh, Siti Nurannisaa's school, sits along a busy road in the Kelantan countryside

She saw at least nine girls being carried out of their classrooms, kicking and screaming. She recognised some of them as regulars at her stall. "It was a heartbreaking sight," she says.

She later saw a witch doctor enter a small prayer room with his assistants. "They were in there for hours," she recalls. "I pity the children for what they must have seen that day."

Image copyright JOSHUA PAUL FOR THE BBC

Security at SMK Ketereh has been heightened since the July 2018 incident. "In order to prevent outbreaks from spiralling again, we restructured our safety programme and had a change in staff," a senior staff member told the BBC on condition of anonymity as he was not authorised to speak to the media.

Daily prayer and psychology sessions have also been introduced, he said. "Safety comes first but we also know the importance of aftercare for our students."

It is unclear what such sessions involve or if they have been designed by mental health professionals. He would not provide further details.

Experts like Robert Bartholomew strongly advocate that Malaysian students be educated about the phenomenon, given its prevalence in the country.

"They should be taught why mass hysteria happens and how it spreads," he says. "It's also important they learn how to cope with stress and anxiety."

Malaysian education ministry officials have not responded to a request for comment.

SMK Ketereh is one of 68 secondary schools in Kelantan. But it is far from the only one to have witnessed an outbreak.

In early 2016, mass hysteria took hold across many schools in the state. "Officials could not handle the multiple outbreaks and shut all the schools," said Firdaus Hassan, a local reporter.

He and TV cameraman Chia Chee Lin remember a febrile atmosphere that April. "It was mass hysteria season and cases were happening non-stop, spreading from one school to another," says Chia.

One case in the nearby town of Pengkalan Chepa attracted significant media attention. Students and teachers were described in reports as becoming "possessed" after seeing a "dark, shadowy figure" lurking around the compound. About 100 people were affected.

Image copyright Joshua Paul for the BBC Image caption Graduate Siti Ain (pictured right) with her mother, who sells drinks and snacks outside the school

Siti Ain, who studied at SMK Pengkalan Chepa 2, says she will remember it as being "the most haunted school in all of Malaysia".

"The scare lasted hours but it took months for life to return to normal," the now 18-year-old says.

She shows us a secluded spot next to a basketball court. "This is where it first started," she says, pointing to a row of tree stumps. "My schoolmates said they saw an elderly woman standing amongst the trees.

"I couldn't see what they saw but their reactions were real."

Image copyright JOSHUA PAUL FOR THE BBC Image caption A row of stumps, where large Angsana trees used to stand

Malaysia's fascination with ghosts dates back centuries and is deep-rooted in shamanic tradition and South East Asian folk mythology.

Children grow up hearing stories about dead infants called toyol - invoked by shamans using black magic - and other terrifying vampiric ghosts like the pontianak and penanggalan, vengeful powerful female spirits that feed on the living.

Trees and burial sites are common settings for these eerie tales. These locations stoke fears that feed into superstitious beliefs.

Image copyright JOSHUA PAUL FOR THE BBC

It's hard to determine what really happened that day at Pengkalan Chapa 2 but officials wasted no time in tackling what they believed to be the source of the problem.

"We watched from our classrooms as workers came with electric saws to cut down the trees," Siti Ain says. "The old trees were beautiful and it was sad to see them go but I understood why."

Like many students here, she sees what happened that day not as an outbreak of mass hysteria but as a supernatural event.

Image copyright JOSHUA PAUL FOR THE BBC Image caption In 2016 a "mass hysteria outbreak" was reported at this sprawling multi-storey school

But this isn't a phenomenon confined to Islamic schools in deeply religious areas.

Dr Azly Rahman, a US-based, Malaysian anthropologist described an episode of mass hysteria in 1976 at an elite boarding school he attended in neighbouring Kuantan city.

"All hell broke loose" during a campus singing competition when a female student claimed to have spotted "a smiling Buddhist monk" on top of a nearby dormitory. "She let out a bloodcurdling scream," he recalls.

Image copyright JOSHUA PAUL FOR THE BBC Image caption As more of Malaysia's forests are lost in the name of development, some believe that spirits have lost their final resting places

Witch doctors were brought in to perform exorcisms on 30 affected girls.

"Their role was to mediate between the living and the dead. But it's important for society today to look to logical explanations behind such outbreaks," Dr Rahman says.

Siti Nurannisaa and her family were given the scientific and medical language of mass hysteria to understand the events of a year ago.

"It would hurt any parent to see their child suffer like ours has," says doting father and former military man Azam Yaacob. He insists that "nothing was wrong" with Siti psychologically.

In the wake of the incident they turned to Zaki Ya, a spiritual healer with 20 years of experience.

Image copyright JOSHUA PAUL FOR THE BBC Image caption "Science can't fully explain the supernatural," says Zaki Ya

At his centre in Ketereh, he greets us with a warm smile. "Apa khabar, how are you?"

He abides by the teachings of the Koran, Islam's holy book, and also believes in the power of Jinn - spirits in Middle Eastern and Islamic cosmology that "appear in a variety of shapes and forms".

"We share our world with these unseen beings," Zaki Ya says. "They are good or bad and can be defeated by faith."

Image copyright JOSHUA PAUL FOR THE BBC Image caption "Cursed" items rest on a table at Zaki Ya's spiritual centre

Islamic scriptures adorn the centre's bright green walls. Bottles of holy water are stacked up high near its entrance.

In a corner by a window, a collection of mysterious objects are gathered on a table - rusty knives, combs, orbs and even a dried seahorse.

"These are cursed items," Zaki Ya warns. "Please do not touch anything."

Image copyright Joshua Paul for the BBC

Zaki Ya met Siti Nurannisaa and her family after the 2018 outbreak at SMK Ketereh. "I've been guiding Siti and she has been getting better with my help," he says proudly.

He shows me a video of another girl he "treated". She is seen thrashing about wildly on the floor and screaming before being restrained by two men.

Minutes later, Zaki Ya enters the room and approaches the visibly distressed girl. He holds her head and chants Islamic verses, and she appears to calm down.

Image copyright JOSHUA PAUL FOR THE BBC

"Women are softer and physically weaker," he tells us. "That makes them more susceptible to spiritual possession."

He professes to understand that mental health plays a role in many of the cases he sees, but is emphatic about the power of Jinn.

"Science is important but it can't fully explain the supernatural," he says. "Non-believers won't understand these attacks unless it happens to them."

Image copyright JOSHUA PAUL FOR THE BBC Image caption An "anti-hysteria kit" costs more than $2000

A more controversial approach comes from a team of Islamic academics in Pahang, the largest state in peninsular Malaysia.

Priced at a hefty 8,750 Malaysian ringgit (£1,700; $2,100), the "anti-hysteria kit" they offer consists of items including formic acid, ammonia inhalants, pepper spray and bamboo "pincers".

Image copyright JOSHUA PAUL FOR THE BBC Image caption Wooden pincers are meant to induce pain in a possessed person and drive out demons and spirits

"According to the Koran, evil spirits are unable to tolerate such items," says Dr Mahyuddin Ismail, who developed the kit with the aim of "combining science and the supernatural".

"Our kits have been used by two schools and solved more than 100 cases," he says. There's no scientific evidence to back up these claims.

Image copyright JOSHUA PAUL FOR THE BBC Image caption Dr Mahyuddin Ismail poses with his "anti-hysteria kit" outside his office at the Universiti Malaysia Pahang

The kit drew widespread criticism upon its release in 2016. Former minister Khairy Jamaluddin called it "the mark of a backward society".

"It's nonsensical, absurd superstition. We want Malaysians to be scientific and innovative, not remain entrenched in supernatural beliefs."

But clinical psychologists, like Irma Ismail from Universiti Putra Malaysia, do not discount such beliefs when it comes to mass hysteria cases.

"Malaysian culture has its own take on the phenomenon," she says. "A more realistic approach is integrating spiritual beliefs with adequate mental health treatment."

Image copyright JOSHUA PAUL FOR THE BBC Image caption A bird's eye view of Kelantan's capital city Kota Bharu

If Malaysia is the "mass hysteria capital of the world", Kelantan on the north-east coast is ground zero.

"It is no coincidence that Kelantan, the most religiously conservative of all Malaysian states, is also the one most prone to outbreaks," Robert Bartholomew says.

Known as the Muslim-majority nation's Islamic heartland, Kelantan is one of two states ruled by the conservative opposition Malaysian Islamic Party (PAS).

Unlike the rest of the country, Kelantan's week follows the Islamic calendar - with the working week beginning on Sundays and ending on Thursdays to free up Fridays for prayers.

"This is a different side of Malaysia," says Ruhaidah Ramli, a sprightly 82-year-old vendor at a local market. "Life here is simple. It isn't busy or stressful like it is in [the capital] Kuala Lumpur."

Image copyright JOSHUA PAUL FOR THE BBC Image caption A woman walks past a mural at the central Siti Khadijah market in Kota Bharu

Are religion and supernatural beliefs related? Academic Afiq Noor argues that the stricter implementation of Islamic law in school in states such as Kelantan is linked to the surge in outbreaks.

"Malay Muslim girls attend school under rigid religious discipline," he says. "They observe stricter dress codes and can't listen to music which isn't Islamic."

The theory is that such a constricted environment could be creating more anxiety.

Image copyright JOSHUA PAUL FOR THE BBC

Similar outbreaks have also been reported in Catholic convents and monasteries across Mexico, Italy and France, in schools in Kosovo and even among cheerleaders in a rural North Carolina town.

Each case is unique - the cultural context is different and hence the form varies. But it ultimately remains the same phenomenon and researchers argue that the impact of strict, conservative cultures on those affected by mass hysteria is clear.

Image copyright JOSHUA PAUL FOR THE BBC

To clinical psychologists like Steven Diamond, the "painful, frightening and embarrassing symptoms" often associated with mass hysteria could be "indicative of a frustrated need for attention".

"Might their remarkable symptoms be saying something about how they are really feeling inside but are unable or unwilling to allow themselves to consciously acknowledge, feel or verbalise?" he wrote in a 2002 article for Psychology Today.

2019 has been a quiet year for Siti Nurannisaa.

"I have been doing okay. It's been calm for me," she says. "I haven't seen bad things for months now."

She's lost touch with much of her cohort after graduating from SMK Ketereh already but this doesn't bother her - she tells me she's always kept a small circle of friends.

She is now taking a break from study before going on to university.

Image copyright Joshua Paul for the BBC Image caption Siti and her ginger cat Chomel

On the day we meet, she shows me a shiny black microphone.

"Karaoke has always been a favourite pastime of mine," she says. Pop songs by Katy Perry and homegrown Malaysian diva Siti Nurhaliza are her favourites.

Image copyright JOSHUA PAUL FOR THE BBC

Singing proved to be a great stress-reliever for the young girl during her ordeal. It helped her gain some confidence back after the very traumatic incident.

"Stress makes my body weak but I have been learning how to manage it," she says. "My goal is to be normal and happy."

Image copyright JOSHUA PAUL FOR THE BBC Image caption Siti and her father Azam Yacob, at their home

On that note, I ask her what she wants to be in future.

"A policewoman," she says. "They are brave and aren't afraid of anything."

Additional reporting and translation by Jules Rahman Ong.