How active a person’s immune system is soon after a stroke may be tied to later mental declines, a new study finds.

Researchers took blood samples from 24 stroke patients up to nine times over the course of a year. Twelve of the patients also completed a mental-skills test at four points during that time. Patients who had highly active immune cells on the second day after a stroke were more likely to see their test scores decline a year later, researchers report online March 12 in Brain.

“The people who either got better on the task or stayed the same had less of an immune response at day 2 [after the stroke], and the people who had more of an immune response at day 2 were more likely to decline and do worse later,” says study coauthor Marion Buckwalter, a neuroscientist at Stanford University School of Medicine.

A stroke occurs when the brain loses oxygen, due to a blocked or burst blood vessel. Buckwalter and her colleagues used a technique called mass cytometry that analyzes thousands of immune cells and their signaling molecules — which indicate how active a cell is — from blood samples of patients who had suffered a stroke. The researchers also tested patients’ memory, concentration, language skills and other thinking skills using the Montreal Cognitive Assessment.

It’s unclear why some patients have a more active immune response than others in the days after a stroke. But with more research, it’s possible that the response may be a way to predict which patients will fare worse after a stroke, the researchers say.