The first act of copulation has been traced back to ancient animals that were endowed with such cumbersome sexual organs they had to mate side by side.

Fossilised features of antiarch fish suggest that early intercourse was not the smoothest of affairs, with males faced with the task of steering their bony L-shaped organs between twin genital plates that adorned the females like tiny cheese graters.

The male’s organ was nearly as long as his body and fixed rigid, leading paleontologists to finally work out that the creature’s small, jointed arm-like appendages were probably of help in achieving the correct position.“Fundamentally, they could not have done it in the missionary position,” said John Long, professor of palaeontology at Flinders University in Adelaide. “The very first act of copulation was done sideways, square-dance style.”

Antiarchs are primitive forms of jawed fish called placoderms that lived in lakes more than 380m years ago. They are known from fossils, only a few centimetres long, dug up in China, Estonia and Orkney in Scotland.

Like so many in science, the latest discovery came about by chance. Last year, Long was working in a palaeontologist’s laboratory in Tallinn, Estonia, when he was handed a box of placoderm bones. Among them he found a plate with a strange, grooved bone attached. He had studied placoderms all his life but was at a loss to explain what it was. Later that day, the penny dropped: “It was a clasper, a sex organ, and it was the oldest and the most primitive one yet found on the planet,” he said.

The chancefinding prompted a search for other samples that led them to private collections of fossils in the UK and the Netherlands. From those they gathered more evidence of male antiarchs with their claspers still attached. The grooves in the organs are used to transfer sperm from male to female.

Further examination of the antiarchs revealed the first evidence of discrete female sexual organs, in the form of small genital plates in exactly the right position to facilitate sex.

An artist’s impression of antiarch fish mating. Photograph: Flinders University/YouTube

The detailed studies led Long and his colleagues to solve another mystery that has puzzled specialists for more than a century. “We’ve often wondered, for over 100 years, what these tiny little jointed arms were used for in these very peculiar fish. Now we know that if your sexual organs are rigid and fixed to your whole body, then little arms are very useful for helping to link the male and female together,” Long said.

“The male can get his large L-shaped sexual organ into the right position to dock with the female genital plates, which are like cheese graters – very rough – so they act like Velcro, locking the male organ into position to transfer sperm.”

The discovery of such ancient copulation means that sex with internal fertilisation evolved early on in the history of vertebrates but was then lost, with fish reverting back to spawning in water, and then evolved again in a different way. Modern sharks and rays have claspers that they use to deposit sperm into females, but instead of being attached to their whole bodies as in antiarchs, the organs grow along the inner part of their pelvic fins.

“We’ve defined the point in evolution when the origin of internal fertilisation in all animals began and that’s a really big step,” said Long. “In terms of evolution, this is the very earliest act of copulation that we know of.” Details of the study are reported in the journal Nature.

Zerina Johanson, a co-author on the paper and researcher at the Natural History Museum in London, said: “Previously we showed that many placoderms had internal fertilisation – males transferring sperm into females, where eggs or embryos developed – but we lacked information from the Antiarchi, currently accepted as the most primitive group of placoderms.”

“Now we know that internal fertilisation is the general condition for placoderms, and is the most primitive type of reproduction for vertebrates,” she added.