Scientists have created a "brain pacemaker" that controls epilepsy in rats by responding only to abnormal electrical patterns in the brain associated with seizures.

The skull implant is similar to an implantable defibrillator and is inserted in the brain and reacts only when a seizure starts to occur by terminating the seizure's electrical activity.

Results from the study, published in the journal Science, showed that the self-adjusting device delivered therapeutic electrical impulses to the brain at the beginning of a short but frequent type of seizure in rats, reducing the length of epileptic seizure by 60 percent in rats with a ‘petit mal’ form of epilepsy, and then automatically shuts itself off.

Most electrical stimulation devices, like ones that deliver deep-brain stimulation to treat Parkinson’s disease and depression, continuously deliver electrical impulses regardless of the patient's brain activity and can cause a range of side effects like headaches.

While other newer seizure-responsive types of deep brain stimulation devices don't continuously operate, these devices also use electrodes that are implanted in the brain and can pose certain risks like worsening epilepsy symptoms.

Lead researcher György Buzsáki, a neuroscientist at the New York University School of Medicine, and his colleagues, used a less invasive treatment method that involved transcranial electrical stimulation (TES) of neurons using electrodes implanted in the skull rather than in brain tissue.

The device is described as a simple, closed-loop system. Additionally, because the device is only activated in response to seizures, researchers said that the risk of causing brain changing side effects is significantly smaller compared to the effects of continuously stimulating devices.

Epilepsy, a brain disorder that triggers repeated seizures over time, affects nearly 3 million people in the U.S., according to the Epilepsy Foundation, making it third most prevalent neurological disorder in the country after Alzheimer's disease and stroke.

Seizures are episodes of disturbed brain activity that leads to changes in attention or behavior. In a seizure, brain cells keep firing instead of acting in an organized way. The brain's faulty electrical system and sudden chaotic neuronal activity triggers an overflow of energy that can cause unconsciousness and involuntary muscle contractions.

Epilepsy patients can suffer from two different kinds of seizures like petit mal seizures and grand mal seizures. Petit mal seizures occur frequently and often last for just a few seconds whereas grand mal seizures are rarer but involve more violent muscle contractions and a loss of consciousness.

Buzsáki and his team tested the new device against petit mal seizures in laboratory rats because this type of seizure can happen hundreds of times a day, allowing the scientists to effectively test the system they designed.

Researchers noted that patients with petit mal seizures are effectively treated with drugs, so the device would not be used to treat that type of seizure and instead by used to treat seizure in drug-resistant patients.

While the device does not prevent seizure, it treats them right away and reduces the length of the seizure by about 60 percent.

Researchers explained that in people, two plates about the size of a pocket watch could be inserted into the skill in a position that targets the affected area of the brain. The electrodes will sit right on top of the brain and be powered by ultra-light electrical circuits implanted in the skull.

Buzsáki and his team hope to replicate their findings on people with complex partial seizures or epileptic seizures that affect both sides of the brain and cause patients to lose consciousness and can occur simultaneously with head injuries, brain infection and stroke.

There is no cure for complex partial seizures, and the cause of the condition is unknown. An estimated 20 percent to 40 percent of people who have complex partial seizures do not respond to medication.

Dr. Orrin Devinsky, director of the epilepsy program at New York University and who was not associated with the study, told HealthDay that the recent findings have great potential for treating epilepsy and other neurological problems like tremors, Parkinson's disease and even serious depression.

"What's unique about this technique is that it's a sophisticated way to identify the rhythmicity of the seizure itself and interrupt the cycle with precision," he said, according to HealthDay. "Existing [deep brain stimulation] devices don't finesse the timing this way."