A new species of a marine-dwelling crocodile has been discovered in Tunisia in northern Africa.
It lived about 130 million years ago, at the start of a period called the Cretaceous. At the time dinosaurs dominated the land and huge reptiles ruled the seas.
Its teeth were designed for crushing hard material
The beast has been given the appropriate moniker Machimosaurus rex, which translates as "fighting lizard-king".
It was over 30ft (10m) long, about the size of a large bus. Its skull alone was over 5ft (1.6m) long.
This makes it the largest "thalattosuchian" ever found. The name refers to an extinct group of marine reptiles that were closely related to crocodiles.
We could see the outline of the body in the ground
It would have eaten anything in sight. Crocodiles today are opportunistic predators, and its co-discoverer Federico Fanti of the University of Bologna, Italy says M. rex would have been too.
"There's no question this animal had a terrific diet. Its teeth were designed for crushing hard material," says Fanti. "Whatever ends up too close to the jaws is supper in one way or another. Considering such a powerful bite, he was not that picky."
The animal has been described by Fanti and colleagues in the journal Cretaceous Research.
The team has been combing through an area of Tunisia for seven years. Fanti was surprised when he came across several ancient skulls: it is much more usual to discover only small remnants of bones or teeth.
Many other large reptiles were already extinct by the end of the Jurassic
"We could see the outline of the body in the ground and counted more than one," says Fanti. There may have been as many as four specimens. His team collected and studied one skull.
Although the remains were so clearly visible, nobody had previously looked for fossils in that part of Tunisia, says Fanti.
What's more, the new find could change our understanding of the transition between the Jurassic and Cretaceous periods.
It has been suggested that there was a mass global extinction during this transitional time. "This discovery undermines that," says Fanti.
That is because many other large reptiles were already extinct by the end of the Jurassic. M. rex seems to have clung on for a further 20 million years.
"We think that we are not looking at a global extinction but local extinction of different species," says Fanti. "Dependent on where in the world you are digging, you are going to find that some species survived and others did not."
The team's work was supported by the National Geographic Society Committee for Research and Exploration