In the sandy seabeds of temperate climates, a curious flatworm thrives. It's called Paracatenula, and it has neither mouth, butt, nor gut. These shortcomings don't slow the worm down, though - a symbiotic relationship with bacteria that live inside it keeps it alive. It works so well, in fact, they've been doing it for over 500 million years.

Exactly how it works though has long baffled scientists. Now, after studying Paracatenula and their bacteria buddies, called Riegeria, they have figured out how the bug feeds the worm.

Over millennia, the bacterium has pared back its genome so that now it only has the most essential functions. It lives in special organs called trophosomes, filling up the main body cavity of the worms. In the image above, you can see the trophosome - it's the part that appears white. Elsewhere, the worm is transparent.

The bacteria are chemosynthetic, which means they rely on chemical processes to produce energy, rather than the Sun's light (photosynthesis). They use the reaction between carbon dioxide and hydrogen sulfide to produce organic compounds, which then feed the worms.

These foods contain lipids and proteins, and probably also sugars, fatty acids, and vitamins.

"We have not seen any­thing like this in any other sym­bi­osis - that, des­pite such a re­duced gen­ome, a single bac­terium can pro­duce so many dif­fer­ent sub­stances and make them avail­able to its host," said marine microbiologist Har­ald Gruber-Vodicka from the Max Planck Institute for Marine Microbiology.

Symbiotic relationships of this kind often involve chemosynthesis on the part of the bacteria, so that part is nothing new. But how the bacteria deliver the supply is also remarkable.

In all other known organisms that rely on chemosynthetic symbiotic bacteria for energy, the host actually digests the bacteria to get to its sweet, sweet nutrients. Those symbiotic bacteria also use transport proteins to deliver nutrients.

Neither of these mechanisms was observed in the relationship between Paracatenula and Riegeria. But electron microscopy revealed the secret: the bacteria serve up the nutrients in the form of tiny droplets that the worm can harvest without harming its pals.

"It's a bit like a fruit garden," Gruber-Vodicka said. "The bac­teria con­tinu­ously bear fruit, which the worm reaps. In other sym­bi­oses it's more like har­vest­ing a corn­field, their bac­teria are com­pletely mowed down, the worm di­gests most of the bac­terial cells."

(These groovy creatures also reproduce asexually by splitting their bodies and growing new worms from the bits. That's not relevant here, it's just really cool.)

In fact, it seems like a perfect system. Everyone gets everything they need, and nothing goes to waste - quite literally.

"The worm has no means to ex­crete but also does not ap­pear to have some kind of cel­lu­lar dump­ster. Everything the bac­teria provide is ap­par­ently used by the worm, one way or the other," Gruber-Vodicka said.

What an amazing world we live in.

The research has been published in PNAS.