(CNN)Unlike most dinosaurs, it seems that spinosaurs liked the water.
This suggestion is based on the analysis of a well-preserved fossil tail of Spinosaurus aegyptiacus, published Wednesday in the journal Nature.
Spinosaurs were a unique group of large-bodied theropods historically interpreted as nearshore waders that fed on fish along the margins of bodies of water.
Bigger than both Tyrannosaurus rex and Giganotosaurus, they lived during the Cretaceous era -- between 145.5 and 65.5 million years ago. That was the last period of the Mesozoic Era following the Jurassic Era, ending with the extinction of dinosaurs (except for birds).
An almost complete tail from a subadult Spinosaurus was found in the 95-million-year-old Kem Kem Beds on the northwestern edge of the Sahara Desert in southeastern Morocco, the researchers said. The tail helped Spinosaurus to move through and hunt in water.
Historically, Spinosaurus was known only from incomplete fossils. The only other associated specimen to be discovered was destroyed during World War II.
Previous research on non-avian dinosaurs suggested these animals were restricted to dry land environments, and proposals that some groups lived in aquatic environments were considered controversial and were abandoned decades ago.
In a 2014 study, some of the same researchers identified a series of adaptations in the largest known spinosaurid, S. Aegyptiacus, that would have supported a semiaquatic lifestyle. They included reduced hind limbs, wide feet with large flat toe bones and long bones that were dense but good for buoyancy. What's more, S. Aegyptiacus had a suite of cranial features such as crocodile-like teeth and jaws, and a nose suited for diving.
How Spinosaurus moved through water was still unknown.
The discovery was, "in many ways, a dream come true, because as a scientist you're always hoping to make a discovery that is really going to change at a fundamental level how people think about a discipline -- in this case, paleontology," said lead author Nizar Ibrahim, an assistant professor of biology at the University of Detroit Mercy in Michigan.
Evidence lost to international warfare
Associated specimens of Spinosaurus were described in the early 20th century by pioneering and legendary German paleontologist Ernst Stromer. Stromer unearthed bones in a different part of the Sahara desert in Egypt, and had them on display at the Bavarian State Archaeological Collection in Munich, Germany.
"At the time, that was actually one of the best and largest natural history museums in all of Europe," Ibrahim said.
"But then in 1944, Allied Forces targeted Munich, and many of these bombing raids were pretty indiscriminate. About 80% of the old town of Munich was destroyed, including the museum where the bones of spinosaurs were housed.
"This was a Royal Air Force bombing raid in April 1944, and it destroyed the only Spinosaurus skeleton in existence. So, pretty dramatic background story."
Stromer had also published early drawings of Spinosaurus. The only materials that survived were two photographs and a couple of drawings, which have been published.
A lone local collector's discovery
After a few Spinosaurus bones were found in Morocco by a local collector in 2008, Ibrahim met the collector that same year. A few months later, Ibrahim was standing in a Milan, Italy, museum when he came across many more bones and realized they belonged to the same skeleton.
"That's when I realized the local fossil hunter found more bones, that [they] belonged to the same skeleton and that the local fossil hunter had sold these other bones to an Italian [geologist and fossil collector] who then donated them to science, and that's how they ended up in an Italian museum," Ibrahim said.
Ibrahim went on to relocate the fossil hunter so he could show him the actual dig site in Morocco.
"It was a lot of detective work, and it was really like looking for a needle in a haystack, because I had to find this one guy who I'd only met once before to get him to show me where he had found these bones," Ibrahim said.
"And as far as he was concerned," Ibrahim continued, "he was done with that dig site. He didn't really think there was much more to be found there. But of course, subsequently we found much more, including most recently the tail of this dinosaur."
Then the team put together a series of expeditions to the Sahara. It wasn't easy, Ibrahim remembered, considering the preparation needed and the exceptionally hot temperatures and storms -- and even flooding -- in the desert.
Ten years later in 2018, the team made most of the significant discoveries with the help of a jackhammer that removed about 15 tons of rock to get to the bone-bearing layer where the tailbones were found.
They found more than 30 vertebrae of the Spinosaurus, representing about 80% of the original tail length and contributing to what is now the most complete skeleton of a Cretaceous carnivorous dinosaur in mainland Africa.
The Kem Kem Beds were home to an evolving river system, with channels and deposits that would have stretched from Morocco to Egypt across what is now the Sahara desert, Ibrahim said.
"It was a river system that covered an area about the size of the United States, and it was home to giant fish, some as big as a car," he added. "So Spinosaurus fits right in there."
There are also areas where the researchers found evidence for ponds or lakes, or where it appeared as a "giant delta." Those aquatic movements have yielded sediments of a diverse assemblage of vertebrates and freshwater fauna, including fish and other large-bodied predatory dinosaurs, but few terrestrial herbivores.
That's the world where Spinosaurus lived, Ibrahim said.
The team examined the actual bones, and then compared them to a few of Stromer's drawings of the bones and two surviving photographs of the mounted bones in the museum in Germany from the 20th century, Ibrahim said.
"We can show very clearly that yes, this is the same species," he added. "This is Spinosaurus. Ours is actually far more complete at this point, so it's in many ways a really big find."
They found the Spinosaurus had a tail with an unexpected and unique shape that consists of extremely tall neural spines and elongate chevrons, which form a large, flexible and paddle-like organ capable of extensive range of motion.
Neural spines are long spines that stick out on top of the vertebrae. Below the vertebrae are chevrons, the V-shaped bones that formed the underside of a dinosaur's tail. Typically, both the chevrons and spines get smaller as you get closer to the tip of dinosaurs' tails. But in Spinosaurus, there were lots of very tall spines and the long chevrons extended far down the tail.
The researchers hypothesized the unique makeup of the tail allowed it to function as a structure that would propel the Spinosaurus through water. Researchers tested the swimming potential of the Spinosaurus tail shape by comparing it to the tails of two terrestrial dinosaurs, two semiaquatic tetrapods and a physical control.