Thousands of years ago, an ancient hominin strode through a sand dune, leaving footprints behind. Most of these marks were lost to the ravages of the years, but one was preserved as the sand hardened to stone.

That print, scientists have now determined, may have been made by a Neanderthal on the island of Gibraltar. This could be the second Neanderthal footprint ever found worldwide - and it's possible it belonged to one of the last members of this species.

Neanderthals (Homo neanderthalensis), one of humanity's closest relatives, have long been extinct, although there's some debate over the exact date of their disappearance from Earth.

It's generally accepted that, around most of the world, Neanderthals vanished around 40,000 years ago. The first confirmed Neanderthal footprint, found in a cave in Romania, dates back to around 62,000 years ago, so it's consistent with this timeline.

The Gibraltar footprint, however, is more recent - it dates back to just 29,000 years ago.

It was found after a now-abandoned quarry revealed the rock face that had been buried for millennia. It's proven a rich site for fossil footprints, and the hominin footprint was included in a paper that also describes newly discovered prints of red deer, ibex, aurochs, leopard and straight-tusked elephant at the site.

(Muniz et al./Quaternary Science Reviews)

But the hominin print, although not well preserved, stood out as something special.

"The single, badly preserved, right-foot hominin footprint shows typical five-toe (with the D1 [big toe] parallel to the longitudinal axis of the track), wider forefoot morphology. The track registers touch-down through kick-off phase resulting in a short medial arch," the researchers wrote.

It's about 17 centimetres (6.7 inches) long, indicating an individual 106-126 centimetres (41.7-49.6 inches) in height, possibly a young adolescent. But, based on this information alone, it's impossible to tell whether it was made by a human or a Neanderthal.

So the team used a dating technique called optically stimulated luminescence, which can determine how long ago the sand grains were last exposed to sunlight. It returned a timespan of 28.45 ± 3.01 thousand years.

Modern humans, as far as we know, had not yet arrived at Gibraltar at that time. And it's possible Neanderthals remained - the island is thought to have been their last refuge, with evidence suggesting they remained there, in Gorham's Cave, until as late as 24,000 years ago.

But it's not quite so clear-cut, either. A 2014 paper was unable to replicate the dating of the Gorham's Cave discovery, and a recent paper found that modern humans may have inhabited the southernmost tip of the Iberian Peninsula, not far from Gibraltar, earlier than thought, around 43-45,000 years ago.

So the possibility that the print belongs to a modern human can't be ruled out. However, the researchers believe that a Neanderthal was the most likely source.

"The morphological data of the footprint combined with the OSL dating obtained and the absence of modern men remains in Gibraltar for the period considered bring Neanderthals closer to be the 'Cinderella'," they wrote in their paper.

They plan to search for more footprints, especially in the caves of Gibraltar, in the hopes of finding out more about who lived on the island and left their traces all those millennia ago.

The paper has been accepted into the journal Quaternary Science Reviews.