A puzzling passage from the Old Testament Book of Joshua could be one of the earliest solar eclipses we have on record - and it could help refine the dates of the reign of Ramesses the Great.

Using both the passage in question and an ancient Egyptian text, researchers from the University of Cambridge in the UK dated the event to 30 October 1207 BCE.

The passage concerns Joshua's defeat over the five kings of the Amorites. As he pursues his foes in Canaan, in a place that is now in the West Bank in the Near East, he prays.

"Then Joshua spoke to the LORD in the day when the LORD delivered up the Amorites before the sons of Israel, and he said in the sight of Israel, 'O Sun, stand still at Gibeon, And O Moon in the valley of Aijalon,'" the passage reads.

"So the Sun stood still, and the Moon stopped, Until the nation avenged themselves of their enemies."

According to co-researcher Colin Humphreys, if the passage is describing a real observation, then a major astronomical event was taking place. However, trying to figure out what the words mean is a little trickier.

"Modern English translations, which follow the King James translation of 1611, usually interpret this text to mean that the Sun and Moon stopped moving," he said.

"But going back to the original Hebrew text, we determined that an alternative meaning could be that the Sun and Moon just stopped doing what they normally do: they stopped shining. This interpretation is supported by the fact that the Hebrew word translated 'stand still' has the same root as a Babylonian word used in ancient astronomical texts to describe eclipses."

The Egyptian text the researchers consulted is the Merneptah Stele, a granite tablet carved during the fifth year of the reign of the Pharaoh Merneptah, son of Ramesses the Great.

It mainly describes Merneptah's victory over the Libyans, but the last three lines also describe a campaign in Canaan, making mention of what many scholars translate as "Israel".

This, the Cambridge researchers believe, verifies the presence of Israelites in Canaan during a specific time period.

Previous scholars have thought that the event might describe an eclipse, and used the two texts to try and narrow down the dates, but couldn't find any eclipses in the timeframe.

However, they were only looking at total solar eclipses, in which the Moon completely covers the Sun.

They didn't consider the possibility that the event could have been an annular solar eclipse, in which the distance between the Earth and Moon is greater, so the Moon appears smaller and doesn't completely cover the Sun, showing a ring of light.

The Cambridge researchers got a match. On 30 October 1207 BCE, the path of an annular solar eclipse swept through the northeast of what is now Canada, the southwest coast of Portugal and Spain, a swathe through North Africa, and back up into the Near East.

It may be not the earliest solar eclipse ever recorded, but it's close.

A monument in Ireland is carved with petroglyphs that could correspond with a solar eclipse that occurred in 3340 BCE, Chinese records refer to eclipses in the 22nd century BCE, and a clay tablet describes an eclipse that took place in Syria in 1223 BCE.

The Canaan eclipse could, however, help refine the date that Ramesses' reign ended and Merneptah's began.

"Solar eclipses are often used as a fixed point to date events in the ancient world," Humphreys explained.

The length of both reigns is established in ancient records, but when they started and ended is not. Using calculations based on the eclipse, the researchers dated the start of Merneptah's reign at 1210 or 1209 BCE - a few years later than previously thought.

This would put Ramesses the Great reigning between 1276 and 1210 BCE, with a margin for error of just one year.

The research has been published in the journal Astronomy & Geophysics.