Scientists have discovered a bizarre species of shipworm – a giant, black worm-like animal that plants itself into mud like carrots and gets energy from noxious fumes of sulphur.

The existence of the creature has been known for centuries. The tusk-like shells, measuring three to five feet long, were first documented in the 18th century.

"The shells are fairly common. But we have never had access to the animal living inside," said Daniel Distel, a research professor at Northeastern University in the US.

Scientists set up an expedition and found live specimens of Kuphus polythalamia planted like carrots in the mud of a shallow lagoon.

With a live giant shipworm finally in hand, researchers carefully washed the sticky mud caked to the outside of the giant shipworm shell and tapped off the outer cap, revealing the creature living inside.

"I was awestruck when I first saw the sheer immensity of this bizarre animal," said Marvin Altamia, researcher at the University of the Philippines.

"Being present for the first encounter of an animal like this is the closest I will ever get to being a 19th century naturalist," said Margo Haygood, a research professor at the University of Utah.

Since the animal had never been studied rigorously, little was known about its life history, habitat, or biology.

"We suspected the giant shipworm was radically different from other wood-eating shipworms. Finding the animal confirmed that," said Haygood.

The worm was was found in a remote habitat – a lagoon laden with rotting wood.

Normal shipworm burrows deep into the wood of trees that have washed into the ocean, munching on and digesting the wood with the help of bacteria.

Unlike its shipworm cousins, Kuphus lives in the mud. It also turns to bacteria to obtain nourishment, but in a different way.

Kuphus lives in a pretty stinky place. The organic-rich mud around its habitat emits hydrogen sulfide, a gas derived from sulphur, which has a distinct rotten egg odour.

This environment may be noxious for you and me, but it is a feast for the giant shipworm, researchers said.

Kuphus themselves do not eat, or if they do, they eat very little. Instead, they rely on beneficial bacteria that live in their gills that make food for them.

Like tiny chefs, these bacteria use the hydrogen sulfide as energy to produce organic carbon that feeds the shipworm.

This process is similar to the way green plants use the Sun's energy to convert carbon dioxide in the air into simple carbon compounds during photosynthesis.

As a result, many of Kuphus's internal digestive organs have shrunk from lack of use.

The study was published in the journal PNAS.