A CT scan of the patient revealed calcification (white) in the back of his brain, caused by celiac disease.

A young man in Brazil who suffered from throbbing headaches and vision problems for 10 years turned out to have stonelike buildups of calcium in his brain.

The stones were likely a rare complication of the man's celiac disease, a digestive condition that the man didn't know he had, according to a new report of his case.

Because of his recurring headaches and vision problems, the man had been treated for migraines, but he hadn't improved. When doctors did a CT scan, they found patches of calcification in the back of the man's brain, in the areas that handle vision.

Lab tests showed that although the fluid circulating in the man's brain was normal, it had higher levels of the antibodies linked to celiac disease, according to the report published today (April 16) in the New England Journal of Medicine. [14 Oddest Medical Case Reports]

Celiac disease is an autoimmune disorder in which the body reacts to gluten, a protein found in wheat, barley, rye and foods made with these grains. This reaction causes inflammation that damages the lining of the small intestine, and prevents the body from absorbing nutrients.

Most signs of celiac disease are related to the gastrointestinal tract, and include stomachache, constipation and diarrhea. Other signs include iron deficiency, skin rash, headaches and fatigue.

However, not everyone who has celiac disease shows all these symptoms, and researchers estimate that neurological complications happen in 6 to 10 percent of patients with celiac disease, according to previous studies.

In this case, blood tests showed the patient had a mild iron deficiency, and further examination of his intestines confirmed he had celiac disease. He was then treated by being told to eat a gluten-free diet and to take iron supplements, as well as epilepsy drugs for his visual disturbances, and his condition improved, according to the report.

It's rare for a person to have a combination of celiac disease, seizures and brain calcification, but it has been reported in a small number of patients. It is unclear how exactly celiac disease leads to calcification in the brain, but it is suggested that a lowered ability to absorb iron may have a role, the researchers said. Similar brain calcification has been seen in patients with other health conditions related to iron deficiency, they said.

Email Bahar Gholipour. Follow us @LiveScience, Facebook & Google+. Original article on Live Science.