Image caption The study revealed that actor Tom Conti is related to Napoleon Bonaparte

The DNA of people living in Scotland has "extraordinary" and "unexpected" diversity, according to a new study.

The Scotland's DNA project, led by Edinburgh University's Dr Jim Wilson, has tested almost 1,000 Scots in the last four months to determine the genetic roots of people in the country.

The project discovered four new male lineages, which account for one in 10 Scottish men.

It also found that actor Tom Conti is related to Napoleon Bonaparte.

Scotland's DNA was set up by Dr Wilson along with historian Alistair Moffat, the current rector of St Andrews University.

Using new technology, scientists were able to pinpoint a participant's DNA marker, from which they tracked the person's history and lineage.

Conti and Napoleon both share the M34 marker, which is Saracen in origin.

The project found that Scotland has almost 100 different groups of male ancestry from across Europe and further afield.

More than 150 different types of female DNA from Europe, Asia and Africa were discovered.

Royal line

Researchers believe that Scotland's location could be a factor in the "astonishing and unique" origins of people from the country.

In a statement, Dr Wilson and Mr Moffat said: "Perhaps geography, Scotland's place at the farthest north-western end of the European peninsula, is the reason for great diversity.

"For many thousands of years, migrants could move no further west. Scotland was the end of many journeys."

Scotland's DNA also found that more than 1% of all Scotsmen are direct descendants of the Berber and Tuareg tribesmen of the Sahara, a lineage which is around 5600 years old.

Royal Stewart DNA was confirmed in 15% of male participants with the Stewart surname. They are directly descended from the royal line of kings.

Scientists believe comedian and presenter Fred MacAuley's ancestors were slaves, sold at the great slave market in Dublin in the 9th Century, despite his name suggesting a Viking heritage.

They said MacAuley's slave ancestor was taken by ship to the Hebrides and had an affair with his owner's wife, thereby intruding DNA into the MacAulay line.

Scotland's DNA will soon be renamed Britain's DNA as the project aims to widen its genetic study to include the English, Welsh and Irish.