GORDON Brown had thought his family roots in Scotland stretched back for hundreds of years through generation after generation.

But the former prime minister and chancellor has discovered the truth is far more exciting after he took a DNA test to probe more deeply into his ancestry.

Mr Brown, whose late father John was a Church of Scotland minister, had thought it extended only to Fife.

Read more: Gordon Brown to make major intervention in EU referendum

But the results of the simple test shocked him when they showed that far from being an ancient Scot, a Pict or a Gael as he expected – he was in fact a Viking.

Mr Brown’s forbears almost certainly migrated from Sweden to England in the ninth or 10th century before journeying north, the scientific evidence showed.

It also supported an old family legend that the Browns had settled in the Borders but were forced to flee as suspected reivers, the raiders and cattle rustlers who terrorised the lands between Scotland and England in the Middle Ages.

The Herald:

According to the family story, they adopted the name Brown at the time to help them escape.

The former Labour leader reveals his Scandinavian heritage in his new book, Britain Leading, Not Leaving, which argues the case for the UK remaining in the EU.

Describing his reaction to the DNA test, he wrote: “To my astonishment, everything that I had assumed was now questioned by the findings.”

Read more: Gordon Brown urges Yes 'defectors'...come back to Labour

Having described his Fife roots “to show my patriotic credentials” in his earlier book about Scotland’s place in the UK, he explained: “What started off as a search for identity that appeared to be purely Scottish in origin ended up as a discovery of my migrant roots – indeed an understanding that almost all of our families, at some stage, have been migrants – and my European roots.”

Mr Brown took a simple saliva test after chatting to his friend the writer Alistair Moffat, who is also behind a company which researches people’s ancestry

using DNA.

He said: “Almost certainly my ancestors had travelled by sea from Sweden to England in search of prosperity and the evidence suggests they left Sweden around the ninth or 10th centuries.

The Herald:

“And from there we were able to piece together, through family stories handed down over the years and by a process of deduction, a picture of immigrants who having arrived on the North Sea coast of England, moved northwards within England to the Border country between Scotland and England.”

Mr Brown is delivering a series of speeches on Britain’s role in the EU as part of the referendum campaign.

Read more: Gordon Brown - Brexit 'would send wrong message to the world about the UK'

He was due to address an audience in Brussels today after launching an education fund in Istanbul.

Making the case for a Remain vote, he wrote: “Those who write off our European heritage are, at least in part, writing off their own heritage.”

His brother, John Brown, said: “It is a very interesting link and came as a surprise when we

discovered it. The Swedish connection is unusual but very strong, it is clearly identified in the DNA.

“As a strange coincidence, our first trip abroad when we were growing up was to Sweden when we went to Gothenburg with a youth group.”

DNA tests have been used to analyse the ancestry of thousands of people across the UK.

Most have genetic markers that trace their ancestry back up to 3,500 years.

People have been linked with various groups of early Britons, Germanic tribes, the ancient Irish, Vikings and other peoples further back into history.

In one of the project's most remarkable discoveries, Ian Kinnaird, from Caithness, was found to be directly descended from the first woman on earth.

In one of the project’s most remarkable discoveries, a Scot was found to be directly descended from the first woman on earth.

Ian Kinnaird, from Caithness, had a genetic marker inherited from his mother that traced his ancestry to an African lineage not previously found in Western Europe.

He was described by researchers as the “grandson of Eve”.