"How do hedgehogs have sex? Carefully." So goes a very old joke. It could surely also be applied to jellyfish, which famously have tentacles that deliver a painful sting.

In fact most jellyfish don't bother with mating. In many species, there aren't even males or females as such.

Even when they do separate into distinct sexes, they have sex in the simplest way possible. Males and females simply release their sperm and eggs into the water in huge numbers. Most are lost, but enough meet to create a new generation.

However, a few box jellyfish have become less stand-offish. Males and females mate more like us, with the male placing his sperm inside the female's body.

Copula sivickisi is one of these species, and a new study reveals that its sexual practices are distinctly bizarre.

Anders Lydik Garm of the University of Copenhagen in Denmark and his colleagues have been studying C. sivickisi, and decided to investigate its mating habits.

Garm says males and females are probably attracted to each other by chemical signals. "When they touch and they are both ready to mate, the male grasps the female and actively transfers a package of sperm to the mouth of the female," he says.

The female then eats the sperm package.

As well as sperm, the package also contains some of the male's stinging cells, which are called cnidocytes.

Ordinarily he would use them to defend himself and to subdue prey. However, these cnidocytes are different from the normal ones.

"These cells are lacking poison, but they still have this protein they use for anchoring," says Garm. "They're used to anchor the sperm to the female gonads. They have lost their function as weapons and become anchors for the sperm instead."

The de-stinged cnidocytes, Garm says, probably help ensure that the sperm stay attached to the female's gonads, where they can be fertilised.

The process of fertilisation is also rather unusual.

In animals such as humans, a single sperm breaks through the outer wall of the egg and fuses with it.

But in C. sivickisi, the female starts to eat the sperm.

"All this happens in the gut system of the female, where there are lots of enzymes present," says Garm. "What seems to happen is that the sperm cells are partly digested."

By breaking down the sperm, the female releases their nuclei, which contain the DNA. She then has to carry the nuclei to the eggs so they can fertilise them.

The eggs are covered in skin cells. They seem to engulf the nuclei, and then transport them to the eggs.

"The enzymes in the gut eat the sperm cells," says Garm. "The nuclei are then eaten by the skin cells and the skin cells then transport the nuclei to the egg cells."

The females then brood the fertilised eggs inside themselves for a few days. This keeps them safe.

But before the eggs are fully developed, the female drops them off. She lays the eggs in a sticky strip called an "embryo strand", which she attaches to the surface of the coral reef where she lives.

For another two or three days, the eggs stay attached to the reef. Finally, the larvae finish developing. "They crawl out of the slime sac and swim away," says Garm.

Sitting in a strip on top of a reef sounds like a very dangerous way to start your life. But the female supplies the eggs with a defence mechanism.

They are laced with some of her cnidocytes. Unlike the de-stinged ones the male used during mating, these are fully functional.

"The female cnidocytes look exactly like the ones present on tentacles for feeding or defence," says Garm.

The results are published in the Journal of Morphology.

No other jellyfish is known to lay its embryos in strands like C. sivickisi, and while some are known to mate and perform internal fertilisation, none has ever been seen using its cnidocytes for mating.

C. sivickisi may have evolved its mating practices to protect its young.

The most dangerous part of an animal's life is the very beginning, says Garm. "The longer you can be protected by your parent, the higher the survival rate."

By combining internal fertilisation, including cnidocytes for anchoring the sperm, with the use of cnidocytes to protect its embryo strand, C. sivickisi is maximising its offspring's chances of survival.

"You don't waste your sperm out in the water, and you make sure that the eggs are nourished and protected to a later stage where they have a higher chance of survival," says Garm.

But there is a cost. Compared to jellyfish that simply spew their sperm and eggs into the water, C. sivickisi can only make a small number of offspring. "There's always a trade-off," says Garm.