Updated

When doctors in Mexico peered into a 17-year-old boy's eye, they got a squirming surprise: a flatworm wriggling in and out of the teen's eyeball.

The teen, who lives in a rural village, had gone to the doctor after three weeks of experiencing pain and decreasing vision in his right eye, according to a report of his case, published today (Sept. 20) in The New England Journal of Medicine .

By the time doctors saw him, the boy could barely see out of that eye. "He could not even see our fingers" when they were held 1 foot (0.3 meters) away from his face, said lead author Dr. Pablo Guzman-Salas, who treated the patient when he was an ophthalmology resident at the Institute of Ophthalmology in Mexico City. Instead, the teen could detect only hand motions with his right eye, according to the report. (His left eye was not affected.)

GRANDMOTHER WHO DIED OF WEST NILE VIRUS DIDN'T KNOW SHE GOT BIT, FAMILY SAYS

More on this...

An eye exam revealed serious damage. The teen's right cornea was swollen and speckled with blood, and there were multiple holes in his iris — all because the worm was "moving freely in the eye," Guzman-Salas told Live Science. The worm was difficult to see because it kept dipping into these holes, he added. (The cornea is the transparent part of the eye that covers the colorful iris and the pupil.)

To access the worm, the doctors needed to surgically remove the lens from the teen's eye , along with the vitreous humor, which is the fluid that fills the eyeball. During the surgery, the doctors noticed that the worm had also caused extensive damage to the retina, which is located at the back of the eyeball.

The worm was about 3 millimeters (0.12 inches) long and 1 mm (0.04 inches) wide, and was removed in several pieces, according to the report. It was broadly identified as a type of trematode, or "fluke," but the doctors couldn't zero in on a specific genus and species. Trematodes include species in the Schistosoma genus , the Fasciola genus and the Paragonimus genus, among others, according to the U.S. Centers for Disease Control and Prevention.

Guzman-Salas noted that this was the "first and only" time he'd seen a case of this kind. "It is not common for trematodes to infect eyes; it is not common for any kind of worm to infect eyes ," he said. Still, in "very, very rare" cases, there are reports of other types of parasitic worms — such as nematodes, or roundworms — infecting eyes, he said.

BABY WHOSE MOM CHOSE TO GIVE BIRTH OVER CHEMOTHERAPY DIES

People can become infected with trematodes by coming into contact with food or water that contains the worm or its eggs — and also because of "really, really bad luck," Guzman-Salas added. Many trematode infections occur when the parasites are ingested and go on to live in a person's gut, according to the CDC. However, when the doctors tested a sample of the teen's stool, they didn't find any signs of the worms, suggesting that the parasite hadn't infected his digestive tract.

In addition to surgery, the teen was given an anti-parasitic medicine, according to the report. Six months after his surgery to remove the worm, his vision in his right eye had not improved.

Originally published on Live Science .