“Try not to get shocked by lightning” is generally sound advice for anyone. But we now know it’s particularly important for one group of people: those with brain implants.

Five years ago, doctors implanted electrodes into a Slovenian woman’s brain. These electrodes connected to a device in her chest known as an implantable pulse generator (IPG), which sent a continuous pulse of electricity into her brain to help manage her painful neck spasms.

Then, lightning struck her apartment building. About an hour later, the woman’s neck spasms returned. The next day, her doctor realized her IPG had turned itself off in response to the lightning.

This week, Slovenian neurologists published a study on the first-of-its-kind case in the Journal of Neurosurgery. In it, they urge doctors and manufacturers to warn patients with brain implants that nearby lightning strikes could cause their devices to malfunction.

Zapping the brain with electricity may sound radical, but some form of the treatment, known as deep brain stimulation (DBS), has been around for decades.

It isn’t just helpful for patients with the Slovenian woman’s neck condition, either. People with Parkinson’s disease, depression, and epilepsy can benefit from the treatment; researchers are also testing it out on Alzheimer’s patients and people battling drug addiction. DBS could even improve the memories of perfectly health people — which means the number of people with IPGs could increase in the coming years.

In the case of the Slovenian woman, her IPG simply shut off during the lightning storm — it wasn’t damaged. Had she been charging the device at the time, however, she might not have been so lucky.

Most IPGs have a two-part charging system: a power pack with an antenna, and an AC power cord. To charge their IPG, the patient plugs one end of the power cord into a wall outlet, and the other into the power pack. Once the pack fully charges, the patient holds the antenna against their skin in the location of the IPG. This charges the IPG.

If she was charging at the time of the strike, the lightning might have destroyed the power pack.

That’s not the worst possible scenario, though. Patients can charge both their power pack and their IPG at the same time, holding the antenna against their chest while the power pack is charging.

If that had been going on when lightning struck, the researchers say the patient could have faced “serious consequences.” How ominous!

The researchers have some suggestions for patients with brain implants: avoid charging during lightning storms, use surge protectors, and see a doctor immediately if you suspect your implant isn’t working. After all, as with anything involving electricity and the brain, it’s probably best to err on the side of caution.