An enigmatic predatory dinosaur that lived in northern Africa about 95 million years ago possessed a long, powerful tail that may have propelled it through water, new fossils suggest.

If true, this beast, close to 40 feet long and not yet fully grown when it died, was a rarity: a dinosaur that swam.

“What we have here is a dinosaur that was not just a wader but an animal that was actively pursuing prey in the water column,” said Nizar Ibrahim, a professor of biology at the University of Detroit Mercy in Michigan.

In a paper published on Wednesday in the journal Nature, Dr. Ibrahim and his colleagues described the skeleton of Spinosaurus aegyptiacus — its name means “Egyptian spine lizard.” Long spines rose vertically from the bones in the 15-foot-long tail, forming a fin-like structure that, the scientists theorize, could undulate back and forth.