A smaller version of tyrannosaurus rex thought to be one of the last dinosaurs living in Africa has been discovered in northern Morocco.

Like its American counterpart, the new species chenanisaurus barbaricus became extinct after a giant meteor struck the Earth 66 million years ago.

A fragment of fossilised jawbone from one of the creatures was found in a phosphate mine at Sidi Chennane, near the city of Khouribga.

Analysis showed it belonged to the dinosaur family of abelisaurs, two-legged predators that roamed Africa, South America, India and Europe at the end of the Cretaceous Period.

The fossil was buried in sedimentary rock forming the remains of an ancient seabed.

After the dinosaur died, sea levels rose and submerged the region.

Dr Nick Longrich studied a jaw bone of a chenanisaurus barbaricus (University of Bath/PA)

Dr Nick Longrich, from the University of Bath, who led the researchers, said: “This find was unusual because it’s a dinosaur from marine rocks, it’s a bit like hunting for fossil whales, and finding a fossil lion.

“It’s an incredibly rare find, almost like winning the lottery. We have virtually no dinosaur fossils from this time period in Morocco. It may even be the first dinosaur named from the end-Cretaceous in Africa.

“It’s also one of the last dinosaurs in Africa before the mass extinction that wiped out the dinosaurs. It’s an exciting find because it shows just how different the fauna was in the southern hemisphere at this time.”

The size of the jawbone indicated it came from a “large abelisaurid”, the scientists wrote in the journal Cretaceous Research.

An artist’s impression of the dinosaur (University of Bath/PA)

At around seven metres (23ft) long, it was just over half the size of T rex. Abelisaurs such as C. barbaricus had short, stumpy arms and “tiny little hands”, said Dr Longrich.

Teeth from the fossil were worn, as if from biting into bone, suggesting that like t. rex the dinosaur ate meat. But unlike the American tyrannosaur, C. barbaricus was not partially feathered. It also had a smaller brain and a shorter, deeper face.

The fossil appears to confirm that after the break-up of the ancient supercontinent Gondwana in the middle of the Cretaceous period, a distinct group of dinosaurs evolved in Africa.