A dinosaur foot found by chance on a Welsh beach could be from the earliest known ancestor of Tyrannosaurus rex.

Palaeontology student Sam Davies made the discovery while searching for fossils on Lavernock Beach, near Penarth, South Wales.

Davies, in his third year at the University of Portsmouth, said: “It was pure luck that I found it. It was just sitting on top of a slab of rock. It was obvious the fossil was fingers or toes, because there were three in a row, but the first thing that came to mind was that it was some sort of plesiosaur.”

Experts who examined the foot concluded that it belonged to the same theropod dinosaur whose skeleton had been uncovered after a cliff fall at the beach last year.

The dinosaur, which lived about 200m years ago, was a mini version of T-rex, probably only 50cm (19.6in) tall, with blade-like, serrated teeth.

The student, who lives in Bridgend, south Wales, was urged to visit the beach by his tutor because its Jurassic cliffs are known to be rich in fossils.

Dr David Martill, reader in palaeobiology at the University of Portsmouth, said: “The timing of this was critical. If I hadn’t put Sam on this project, if he hadn’t been there at that time, if the cliff fall hadn’t happened, if the tide had come in, then Sam wouldn’t have found it. This was a chance in a million find and highlights how important it is to encourage fossil-hunting in this country.

“This new specimen will help us chart the evolution of dinosaur feet, specifically looking at the number of toes and the nature of the ankle bone.”

Davies has donated the foot to National Museum Wales, where the rest of the dinosaur is on display until the end of the month.