For days, 78-year-old Mr. B felt haunted in his own home. There was another man behind the mirror in his bathroom, one who looked like Mr. B, dressed like Mr. B, and seemed to copy his every move, yet was totally strange to him.

The stranger was his own reflection, but Mr. B didn’t know that.

A creepy case study in the journal Neurocase examines the strange story of Mr B. (so named to protect his identity), an elderly Frenchman who looked in the mirror and couldn’t recognize himself.

Mr. B had a mysterious disorder called Capgras syndrome, a condition that renders once-familiar figures suddenly foreign. Patients with the syndrome often believe that their friends, family members, even pets, have been replaced by an identical impostor. Their world is a weird variation on the horror movie “Invasion of the Body Snatchers.” But with Capgras, it’s not aliens that are turning loved ones into strangers — it’s the patients’ own brains. No one quite knows what causes the delusion, and no one is sure how to cure it.

Mr. B’s condition was especially strange, his doctors say, because it was himself he couldn’t recognize.

A divorcee and father of four, Mr. B had no history of neurological problems or psychiatric disorders. His ailments were ordinary, the kind of complaints that usually come with old age: hypertension, high cholesterol, circulation issues. He’d previously been treated for lymphoma, but the cancer, thankfully, was in remission.

And then, suddenly, the stranger appeared in the mirror.

“The stranger was a double of himself,” Mr. B’s doctors write. “He was the same size, had the same hair, body shape, and features, wore the same clothes, and acted the same way.”

Mr. B had conversations with the stranger, who seemed to know an awful lot about Mr. B. He began to bring his meals into the bathroom, making sure to have two sets of cutlery — one for the stranger, one for himself.

Apart from that, Mr. B’s behavior was normal. He recognized his family members, he knew where he was and when. After 10 days the stranger in the mirror began to act “aggressive” (the case study doesn’t go into detail), so Mr. B’s daughter brought him to a hospital in Tours, France.

That’s where doctors at the University Francois Rabelais came upon his strange condition. Tests revealed that Mr. B’s condition wasn’t psychological, but neurological — he had signs of early Alzheimer’s.

Alzheimer’s, as well as other degenerative diseases and various kinds of brain damage, is known to bring on Capgras syndrome. A patient will look totally fine in almost every respect, but when they see a certain family member, or a friend, or, as in Mr. B’s case, their own reflection, something in their brain doesn’t click. They recognize what they’re seeing as familiar, but it’s not the person they know.

“There’s a feeling, or a certain essence [that] the soul of the person isn’t in there,” Carol Berman, a psychiatrist at NYU Medical Center, told NPR in 2010.

Berman said there can be psychological reasons for the condition — perhaps the patient is upset about negative aspects of a loved one that they don’t want to recognize, so they become unable recognize the person altogether. A wife with Capgras might say, “My husband would never act like that,” and conclude that the man before her must not be her husband. Many Capgras patients suffering from mental illness — including the patient in whom Dr. Joseph Capras first diagnosed the condition — fit this category.

But neuroscientists, including Mr. B’s doctors, say that the condition can also stem from a physical part of the brain, rather than some abstract problem in the mind.

The first clues about the neurological origin of Capgras came from the study of prosopagnosia, or face blindness. The condition is caused by damage to the fusiform gyrus, the visual processor in the brain responsible for identifying faces. People with this condition can’t explicitly recognize familiar faces, even their own. But they do have the appropriate emotional response at the sight of a loved one — their body recognizes the face, even if their brain isn’t quite sure what it’s looking at.

People with Capgras syndrome have the opposite problem, Mr. B’s doctors write. The visual processors in their brain can identify a face as familiar, but the emotional response isn’t there.

In a TED talk in 2007, University of California-San Diego neuroscientist V. S. Ramachandran explained that after an image is recognized by the brain’s visual processors, it “cascades” into the amygdala, the emotion and memory-processing part of the brain.

The amygdala “gauges the emotional significance of what you’re looking at,” Ramachandran said. “Is it prey? Is it predator? Is it mate? Or is it something absolutely trivial, like a piece of lint?”

Ramachandran’s theory is that Capgras syndrome is caused by some sort of problem here. A man who thinks his mother has been replaced by an impostor might have a functioning fusiform gyrus — he acknowledges that her face looks familiar — but a problem in his emotional centers.

“Because the wire is cut to the emotional centers, he says, ‘But how come, if it’s my mother, I don’t experience a warmth?'” Ramachandran said, a hypothetical Capgras patient. “And therefore, he says, ‘How do I account for this inexplicable lack of emotions? This can’t be my mother. It’s some strange woman pretending to be my mother.'”

Capgras patients are tricked in this way, Ramachandran says, because so much of how humans interact with the world is determined by these emotional centers. When the visual parts of the brain and the emotional parts come into conflict, we nearly always believe what our emotions are telling us.

That can be devastating for patients with Capgras, and even more so for the people they don’t recognize. Berman, the NYU psychiatrist, has a husband with Capgras, she told NPR.

“I’m very sad and upset and stressed out by the whole situation,” Berman said. “You know, when I get home and I kiss my husband and say hi, how are you today, I hope he’s recognizing me. But you never know what you’re going to get when you get back home.”

Mr. B’s problem could be even more complicated than what Berman’s husband suffers from, according to Mr. B’s French doctors. Neuroimaging studies have shown that the pathway in the brain associated with emotions about one’s self is different from the one that responds to familiar people.

For now, though, Mr. B. seems to be okay. His doctors prescribed him an antidepressant and an antipsychotic that are both often used to treat Alzheimer’s, and within three months his syndrome had subsided. Mr. B no longer complains about the bizarre body double hiding in the bathroom. When he looks in the mirror, all he sees is himself.