One night in March of last year, a praying mantis crept onto a rooftop garden in India and perched on an artificial pond, waiting intently. When an unsuspecting guppy swam by, the insect snatched it up and gobbled it down—marking the first time that a praying mantis has been observed fishing for its food in the wild, reports Jake Buehler of National Geographic.

The unusual scene was observed by the conservationist Rajesh Puttaswamaiah, who witnessed the male giant Asian mantis (Hierodula tenuidentata) return to the rooftop garden on five consecutive nights. The stealthy critter would hang out on water lilies or water cabbage leaves until a guppy got close enough to grab. It ate up to two fish during each hunting session, and managed to catch a total of nine guppies. After the fifth night, the mantis stopped paying visits to the garden.

Puttaswamaiah, conservationist Nayak Manjunath and Roberto Battiston, an entomologist at Italy’s Musei del Canal di Brenta, describe this unprecedented hunting behavior in the Journal of Orthoptera Research. Mantids, they note in their new report, have been known to feast on small vertebrates like lizards, mice, snakes and turtles, but these encounters often take place in cages or as the result of other types of human interference. More typically, mantids will eat insects, especially fly-like ones.

Research has shown, however, that praying mantises can be crafty and aggressive hunters. A 2017 study found that praying mantises around the world are able to catch and eat small birds, most of them fast-moving hummingbirds. But even though the insects appear willing to chow down on most things they can grab, Puttaswamaiah and his co-authors were surprised that the rooftop praying mantis could see well enough to catch fish in the dark.

The structure of praying mantises eyes “clearly indicates that they have evolved to prey in daylight,” the researchers explain in a press release, yet the mantis described in the study always hunted at sunset or later. That the insect was able to see its prey in water, which presents another “visual barrier,” Battiston tells Buehler, is even more surprising. But he has a theory about how the mantis managed to catch the guppies.

“[A] mantid’s eye doesn't work like ours,” he says. “They see movements better than shapes or colors. The [guppies] have a large tail they move like a flag while swimming, and it may have resembled to the mantid a strange bug scampering around.”

The guppy-gulping mantis also suggests that the insects may be capable of complex learning. The rooftop garden was full of many tasty insects for the critter to eat, but it chose to return, night after night, to the same hunting spot.

"This behavior sounds very much like a precise hunting strategy—not random choices," Battiston tells Mindy Weisberger of Live Science.

Like many predators, praying mantises are capable of aversive learning, or learning from negative experiences; a recent study showed that the insects figure out to avoid prey that has been made artificially bitter. The rooftop mantis, according to the study authors, “suggests a further step to a more articulated cognitive process”: the ability to consider various environmental cues—the prey’s abundance at a particular site, their ease of capture, their nutritional value—and formulate new hunting strategies.

Of course, the researchers’ theories are based on the behavior of a single praying mantis, and further investigations are needed before any new conclusions about the insect's hunting and cognitive abilities can be made. But the possible implications of the critter’s late-night snack fest is, at the very least, interesting food for thought.