Image copyright Getty Images Image caption The palace at Knossos on Crete was an important centre for the Minoan civilization

DNA is shedding light on the people who built Greece's earliest civilizations.

Researchers analysed genetic data from skeletons dating to the Bronze Age, a period marked by the emergence of writing, complex urban planning and magnificent art and architecture.

These ancient Aegean people were mostly descended from farmers who had settled the region thousands of years earlier.

But they showed signs of genetic - and possibly cultural - contact with people to the north and to the east.

Dr Iosif Lazaridis, from Harvard Medical School in Massachusetts, and colleagues focussed on burials from the Minoan civilization, which flourished on the island of Crete from 2,600 to 1,100 BC, and the Mycenaean culture, which existed across Greece from 1,600 -1,100 BC.

"They're important because they are the first known civilizations in Europe that had writing and a level of complexity that was not present in earlier cultures... It's always been a puzzle: where did these people come from and how did they create this amazing culture," Dr Lazaridis told BBC News.

Image copyright Getty Images Image caption Reconstruction of a fresco at Knossos showing Minoan women

"With ancient DNA we can now begin to answer this question."

Dr Lazaridis explained that most of the people who created these civilizations appear to be local - deriving between 62% and 86% of their ancestry from people who introduced agriculture to Europe from Anatolia (modern Turkey) in Neolithic times, starting from about 7,000 years ago.

But the Bronze Age Mycenaean and Minoan skeletons revealed ancestry from populations originating in either the Caucasus mountains or Iran. Between 9% and 17% of their genetic make-up came from this source.

In addition, the team's paper in Nature journal reports, the Mycenaeans - but not the Minoans - show evidence of genetic input from people who lived further north, on the flat grasslands that stretch from eastern Europe to Central Asia. Between 4% and 16% of their ancestry came from this northern source.

This fits with previous evidence from ancient DNA studies, showing that there was a major migration into Europe from this region during the Bronze Age. These nomadic livestock herders from the Steppe had a major impact on the gene pools of Northern and Central Europe. But the influence of Steppe migrants on populations from southern Europe - including Greece - was much more modest.

Image copyright Getty Images Image caption The Mycenaeans established the first advanced civilization in mainland Greece

The researchers don't know exactly when the northern and eastern influxes of people occurred, but both genetic components are missing from the stone age farmers who inhabited Greece during the Neolithic. This suggests that these later waves of migration arrived in either the third or fourth millennium BC - a time gap for which the researchers lack ancient DNA data.

Dr Lazaridis says that both waves of migration might have acted as "cultural disruptors".

"The migrants could be the bearers of innovation... a vehicle through which some new elements of culture arrived in Greece," he explained.

By contrast, the researchers found no evidence for proposed migrations to Greece from ancient Egypt or from the areas of the eastern Mediterranean occupied by the Phoenician sea-faring culture.

The work could also provide clues to the origin of Greek language. Like the majority of languages spoken in Europe today, Greek belongs to a family known as Indo-European. The members of this language family share common features of vocabulary and grammar.

But how and when Indo-European speech spread across Europe remains a subject of debate. Some scholars believe the languages were introduced by the first farmers migrating from the Near East.

Other researchers believe they were spread later, during the Bronze Age, by the herders who migrated west from the Steppe.

But the much more minor influx of Steppe people into Greece compared with northern Europe has led some to conclude that this migration could not have effected a change in language. This might imply that progenitors of Greek - and perhaps other Indo-European languages - were already established in the Aegean by the time the Steppe people arrived.

While the Mycenaeans are known to have spoken an early form of Greek, the earliest recorded language spoken by the Minoan people on Crete - known as Linear A - can be read but not translated. This implies that it belonged either to a distinct branch of Indo-European or to an entirely different language family.