A new species of pterosaur with more than 400 teeth which ate in a similar way to ducks and flamingos has been discovered in Germany.

The fossil of the nearly complete Balaenognathus maeuseri, part of the pterosaur family, was discovered accidentally in a Bavarian quarry while scientists were excavating a large block of limestone containing crocodile bones.

Since the first pterosaur was discovered in Bavarian limestone in the 18th century, hundreds of remains of the flying reptiles have been unearthed, making the quarries of the Franconian Jura one of the richest pterosaur localities in the world.

The research was led by Professor David Martill of the University of Portsmouth, Hampshire, and involved palaeontologists from England, Germany and Mexico.

Prof Martill said: "The nearly complete skeleton was found in a very finely layered limestone that preserves fossils beautifully.

"The jaws of this pterosaur are really long and lined with small, fine, hooked teeth, with tiny spaces between them like a nit comb.

"The long jaw is curved upwards like an avocet and at the end it flares out like a spoonbill. There are no teeth at the end of its mouth, but there are teeth all the way along both jaws right to the back of its smile.

"What's even more remarkable is some of the teeth have a hook on the end, which we’ve never seen before in a pterosaur ever.

"These small hooks would have been used to catch the tiny shrimp the pterosaur likely fed on – making sure they went down its throat and weren’t squeezed between the teeth."

The bones of a Balaenognathus maeuseri found in the slab of limestone

The animal likely dabbled as it waded through shallow lagoons, sucking in tiny water shrimps and copepods and then filtering them out through its teeth in the same way as ducks and flamingos.

The name 'Balaenognathus' roughly translated means whale mouth because of its filtering feeding style, while the specific name 'maeuseri' is in honour of co-author Matthias Mauser, who died during the writing of the paper.

Prof Martill said: "Matthias was a friendly and warm-hearted colleague of a kind that can be scarcely found. In order to preserve his memory, we named the pterosaur in his honour."

The paper, A new pterodactyloid pterosaur with a unique filter-feeding apparatus from the Late Jurassic of Germany, is published in Palaontologische Zeitschrift.

The specimen is currently on display in the Bamberg Natural History Museum in Germany.