Image copyright Marc Boulay, Cossima Productions Image caption "Kind of looks like a toilet seat": A 3D reconstruction shows the animal's big, flattened head

Scientists have discovered a new species of massive, toothy amphibian dating from 220 million years ago.

Hundreds of the creatures probably died when a lake dried up, leaving a huge jumble of bones which is now being excavated in southern Portugal.

Although related to modern salamanders, the two-metre beast probably lived more like a crocodile, snapping up fish and scrapping with rivals on the shore.

The find is reported in the Journal of Vertebrate Paleontology.

Nobody's pet

"It's basically a salamander that's the size of a car," said Dr Steve Brusatte, a palaeontologist at the University of Edinburgh who led the research.

"It's one of those creatures from the distant past that looks like an alien - but it actually has quite a lot of relevance. These kind of big amphibians were the ancestral stock that modern frogs, salamanders and newts came from."

Image copyright Joana Bruno Image caption The animals had very flattened heads and lots of sharp teeth

But unlike the mostly small and cute amphibians we know today, Metoposaurus algarvensis sat, rather heavily, at the top of the food chain.

In a way, it was the death of these things that allowed the dinosaurs and mammals to take over Dr Steve Brusatte, University of Edinburgh

"[It] had hundreds of sharp teeth in its big flat head, which kind of looks like a toilet seat when the jaws snap shut," Dr Brusatte said.

In the late Triassic period, when dinosaurs and mammals were still small and marginal, it was monsters like this which were "the big dogs", he told BBC News.

Other, related species were even bigger, stretching up to 10m in length - more like a bus than car.

Together these species dominated the supercontinent Pangaea, which was only beginning to split into today's land masses.

Dangerous waters

"These big amphibians were some of the main predators and denizens of that world. So our earliest ancestors and the earliest dinosaurs would have had to deal with these guys in their formative years," Dr Brusatte explained.

Image copyright Octavio Mateus Image caption Dr Brusatte and his colleagues excavated the fossils in Portugal

Mostly their big jaws were used to munch fish, and being amphibians they were unable to venture far from water. But Dr Brusatte imagines M. algaryensis would have posed a big, ugly threat to any early mammals or dinosaurs that got too close.

"Like people down in Louisiana or Florida today: 'Stay away from the water or the crocs might get you!' I think that's what it would have been like with the earliest dinosaurs."

In spite of their dominance, this and related species of outsized amphibian all died out in the late Triassic when the world was rocked by millennia of savage volcanic eruptions.

"In a way it was the death of these things that allowed the dinosaurs and mammals to take over," Dr Brusatte said.

And in that turbulent climate, smaller scale exterminations - such as the one captured in the ancient Portuguese lake bed - were common. A car-sized salamander could hardly strike out for a far-off lake if its own waterway dried up.

That makes "big mass graves of monstrous amphibians" a known feature of the Triassic, Dr Brusatte said.

At the dig in the Algarve, he and his colleagues have explored only a small fraction of the area. They have found fossilised bones from at least 10 individuals and expect to find hundreds more.

"That's a pretty neat thing, because it means we have a lot of fossils that can really tell us about how big this guy was, about what its biology was like, about the world that it inhabited."

Image copyright O Mateus, R Butler, S Brusatte Image caption The team has already excavated bones - like these skull fragments - from at least 10 animals

They're relatives of salamanders in the same way that the duck-billed platypus is a distant relative of ours Prof Susan Evans, University College London

Susan Evans is a professor of palaeontology at University College London. She told BBC News the new Metoposaurus was an impressive specimen, and noteworthy as the first such find in southern Europe.

She added, however, that similar animals are already well-known within the field.

"It's a well-preserved specimen and it's a new locality, but these things have been found in quite a lot of places," Prof Evans said.

And although the salamander is indeed this critter's closest living relative, she emphasised that they are far from kissing cousins.

"They're relatives of salamanders in the same way that the duck-billed platypus is a distant relative of ours," she said.

Follow Jonathan on Twitter