Here, an extreme closeup on a mysterious glow worm that was discovered in the Peruvian rainforest

A mysterious glowing worm has been discovered lighting up the soil in the Peruvian rainforest.

The strange glow worms, which are thought to be the larval stage of an as-yet-unidentified species of beetle, may use their phosphorescence to lure unsuspecting flies and ants into their waiting, open jaws.

Ants or termites will "fly right into their jaws, and then they'll just clamp shut and that's their meal," said Aaron Pomerantz, an entomologist who works with a rainforest expedition company at the Refugio Amazonas near the Tambopata Research Center in Peru, where the glowing larvae were discovered. [See Images of the Glowing Worm]

In tests, the glow worms readily devoured stick insects and termites, Pomerantz said. Their style of attack seems similar to that of the enormous, man-eating worms in the 1990 campy movie "Tremors," albeit at a much smaller scale, he said.

"They're underground, and they burst from the earth," Pomerantz told Live Science.

Glowing earth

Nature photographer Jeff Cremer found the tiny pinpricks of light glowing in a wall of earth when he was working at a lodge in the Peruvian jungle. On closer inspection, Cremer discovered several dozen of these tiny insects, which measured about 0.5 inches (1.2 centimeters), shining green in the night.

Cremer brought them to the attention of entomologists who work at the rainforest nature lodge, who had never seen anything similar in the region.

The team determined that the worms were the larvae of an unknown species of click beetle. These beetles, which belong to the family Elateridae, use a fast popping or "clicking" motion to escape predators, Pomerantz said. Adults may feed on flowers and nectar, but the larvae are probably predatory.

There are more than 10,000 species of click beetles, including about 200 that are bioluminescent, meaning that they give off light. These strange little creatures may potentially be cousins of Brazilian fire beetles and could belong to the group of bugs called Pyrophorini, Pomerantz said.

Brazilian fire beetles burrow into termite mounds, creating ethereal, glowing towers at night, Pomerantz said. Though it's not exactly clear how the newly discovered insects produce light, similar creatures use a class of molecules known as luciferins to give off their ghostly yellow glow. Pyrophorini typically maintain a constant glow through the night, and may even shine brighter when a predator touches them.

Why they glow

Bioluminescent animals usually glow to either lure in prey or to warn predators that they contain noxious chemicals. But the glowing also occasionally serves other purposes. For instance, fireflies' blinking is essentially a come-hither signal for potential mates, Pomerantz said.

In the case of the click-beetle larvae, it seems the creatures glow to lure in prey, Pomerantz said. The Brazilian click beetles aggregate in termite mounds and glow to attract more prey.

Right now, the team isn't sure if it's discovered a completely new species or a new subspecies of an already known species of beetle larva, but the researchers are contacting experts in Brazil to find out, Pomerantz said.

Follow Tia Ghose on Twitterand Google+. Follow Live Science @livescience, Facebook & Google+. Originally published on Live Science.