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.

When Dr. Shipway extracted one of the tiny captured shipworms from its burrow, he knew right away he was looking at something new.

“This is probably a new species, immediately just from looking at the siphons,” he said he recalled thinking, as he examined the tubular structures that allow the worms to expel waste. “They were pink and pinstriped.”

Back on the other side of the world in a lab in Boston, the researchers confirmed that the pink-striped shipworm, which can range in size from about 2.5 to 6 inches long, was not only a new species but a representative of a new genus. They explored its insides using a type of CT scanning and learned that its organs are arranged in a pattern unusual even for a shipworm. Not only have its heart and kidneys swapped places, but one portion of the digestive system is extremely long.

“It’s about six times as long” as that of most other shipworms, perhaps to help in the processing of its food, said Dan Distel, also of Northeastern.

The researchers now plan to sequence the genomes of the bacteria that live within the new shipworm to learn what they are and what kinds of substances they make.

“Some shipworms have as many as ten different symbiont species,” Dr. Distel said.

Studying those bacteria could help reveal details of how this species lives, as well as provide new leads for substances that are useful to people, like digestive enzymes that could help make biofuels. It’s all a part of these creatures’ transition in some humans’ eyes from dangerous pest to fascinating obsession.