After a British man complained of chronic headaches, an MRI revealed a terrifying diagnosis.

In 2013, doctors found a tapeworm inside his brain, according to this CNN report. And that's not all—it's possible it had been there causing headaches for four years.

"It had moved from one side of the brain to the other…very few things move in the brain," Dr. Effrossyni Gkrania-Klotsas, a consultant at Addenbrooke's Hospital in Cambridge, told CNN.

Tapeworms don’t appear in humans very often, and typically turn up in the digestive tract as a result of eating undercooked meat.

The man, of Chinese descent, had recently visited China, South Korea, Japan and Thailand, but first complained of headaches four years earlier, when doctors treated him for what they thought was tuberculosis, according to the CNN report. But as the worm moved, the symptoms changed, causing seizures and weakness. That’s when doctors discovered the worm and went in surgically to remove it.

Helena Helmby of the London School of Hygiene and Tropical Medicine told CNN a tapeworm common in pork is typically the one that charts the easiest course to the brain.

Pork tapeworms also pose a threat to the liver, eyes and heart, according to WebMD.

Read more at Rare.com.