Consider the clam.

Imagine that its two iconic shells have shrunk into a collar, fringed with jagged teeth, which it uses to gnaw through wood. Imagine that its digestive tract and most of the rest of its organs have gotten pushed out the backdoor of the shell, forming a long streamer of flesh that it keeps safe by burrowing into the wood it eats. And imagine that it is larded with symbiotic bacteria that aid the creature in the digestion of all that wood.

Congratulations: You have arrived at the shipworm.

Shipworms and their bizarre wood-eating lifestyle loomed large in the fears of sailors for centuries, as they can send a vessel to the bottom with little more than concerted munching. Even today they can bring structures with wood pilings under them, like Pier 5 in Brooklyn, to their knees. But they are also intriguing as potential sources for new antibiotics, among other things, which led a team of researchers last year to a river mouth in the Philippines where they pulled up a piece of wood that turned out to contain a new species of shipworm, which they named Tamilokus mabinia.

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

The discovery, which was reported in the journal PeerJ on Thursday, occurred during a feverish episode of wading through mangroves and scuba diving in coastal waters looking for wood that contained shipworm burrows. The team brought their finds to the parking lot of a beachgoers’ hotel, where, wearing headlamps and wielding axes, they extracted the worms and brought them up to their hotel-rooms-cum-biology labs.

“It’s not what you expect when you book your beach holidays to see people doing this,” said Reuben Shipway of Northeastern University, one of the study’s co-authors. But working quickly allowed the team, known as the Philippine Mollusk Symbiont International Collaborative Biodiversity Group, to identify, photograph and begin the process of sequencing the DNA of the animals and their bacterial symbionts right away.