DNA has been used to confirm the existence of an elite social class in the Stone Age inhabitants of Ireland.
It's one of the earliest examples of such a hierarchy among human societies.
A key piece of evidence comes from an adult male buried at the 5,000-year-old Newgrange monument; his DNA revealed that his parents were first-degree relatives, possibly brother and sister.
He was one member of an extended "clan" that was buried at impressive stone monuments across Ireland.
The Irish elites were established during Neolithic times, when people first started farming. The researchers extracted DNA from 44 ancient individuals from across Ireland and sequenced their genomes (the full complement of genetic material contained in the nuclei of cells).
Evidence of incestuous unions like that found at Newgrange are rare in human history; they are taboo for inter-linked biological and cultural reasons. Where they do occur, it is often within royal dynasties that have been granted divine status.
Brother-sister marriages are found among the pharaohs of ancient Egypt and the "god-kings" of South America's Inca Empire. Tutankhamun's parents, for example, are thought by some to have been full siblings. Among these cultures, rulers drew on aspects of religion to legitimise their power and wielded it through the construction of extravagant monuments.
Commenting on the genetic patterns seen in the man from Newgrange, Lara Cassidy, assistant professor at Trinity College Dublin, said: "I'd never seen anything like it.
"We all inherit two copies of the genome, one from our mother and one from our father; well, this individual's copies were extremely similar, a tell-tale sign of close inbreeding. In fact, our analyses allowed us to confirm that his parents were first-degree relatives."
The Newgrange monument in County Meath is a kidney-shaped mound covering an area of more than one acre. It's part of a tradition of elaborate monuments built with large stones, or megaliths, in Atlantic Europe during the Neolithic.
Older than Stonehenge and the Pyramids of Giza, the site is famous for its annual solar alignment where the winter solstice sunrise illuminates the inner chamber in a blast of light. The man's remains were laid in a richly decorated recess in the inner chamber.
"The prestige of the burial makes this very likely a socially sanctioned union and speaks of a hierarchy so extreme that the only partners worthy of the elite were family members, said Prof Dan Bradley, also from Trinity College.
Dr Cassidy, who is first author of the new study published in Nature, told BBC News: "It's an extreme of what elites do - marrying within your kin group allows you to keep power within your 'clan',
"But elites also break lots of rules, to separate themselves from the rest of the population... it's a bit chicken and egg: by breaking these rules you probably make yourself seem even more divine."
Remarkably, a local myth resonates with both the DNA results and the Newgrange solar phenomenon. The story was first recorded in the 11th Century AD - four millennia after the construction of Newgrange - and tells of a builder-king who restarted the daily solar cycle by sleeping with his sister.
The Middle Irish place name for the neighbouring Dowth passage tomb, Fertae Chuile, is based on this lore and can be translated as "Hill of Sin".
Dr Tom Booth, senior research scientist at London's Francis Crick Institute, who was not involved with the study, called the study "impressive", further describing it as "the most detailed picture yet of the genetics of people who inhabited Britain and Ireland during the Neolithic period".
He added: "Given how remote these societies are from our own, I am wary of talking about dynasties or monarchs as we understand them today, and people anticipating a Neolithic Game of Thrones may have to have a cold shower.
"But certainly the evidence is quite convincing that certain megalithic tombs in Ireland were reserved for people who were biologically more closely related to one another, including potentially prestigious groups of families who married amongst themselves."
The team unearthed a web of distant familial connections between the man from Newgrange and other individuals from passage tomb sites across the country, including the "mega-cemeteries" of Carrowmore and Carrowkeel in County Sligo.
"It seems what we have here is a powerful extended kin-group, who had access to elite burial sites in many regions of the island for at least half a millennium," explained Dr Cassidy.
Tom Booth said: "In Britain, recent discoveries that some tombs were built over the remains of timber houses has been used to suggest that these sites were linked to particular families, but solid evidence for who ended up in these tombs and why has always been elusive."
The ancient genomic survey also uncovered the earliest diagnosed case of Down's syndrome - in a male infant buried 5,500 years ago in the Poulnabrone portal tomb, County Clare.
"He was interred within a sacred place; he was breastfed before his death," explained Dr Cassidy. "It's an interesting glimpse at what the social values of this society might be.
"People with disability can sometimes be invisible within the archaeological record. I think it's really nice that we can now shed a light on this with ancient genomes."
Ireland's Neolithic inhabitants traced their origins to an expansion of people out of Anatolia (modern Turkey) around 6,000-7,000 years ago. This migration transformed Europe's way of life from one focused on hunting to one based on agriculture. Genetically, Ireland's first farmers were most closely related to people living at broadly the same time in Iberia (modern Spain and Portugal).
Over generations, the farmers traversed the Mediterranean from Anatolia to Iberia, weaving their way up the French coast before making their way to Ireland by sea.
On reaching the shores of this North Atlantic landmass, the new migrants quickly displaced the local Mesolithic hunter-gatherers, who were genetically similar to pre-farming peoples across Europe. However, their DNA shows they developed a distinctive character after being isolated for centuries.
Their genetic code shows little sign of interaction with similar populations in Britain, suggesting the Irish Sea posed a formidable barrier to contact in the centuries before farming.
DNA predicts that Ireland's hunter-gatherers had a striking combination of dark skin and blue eyes. By contrast, the Anatolian farmers probably had paler skin with brown eyes.
The small population of hunters may have been overwhelmed when the farmers arrived with bigger numbers. But they didn't completely vanish.
Two individuals from a wedge tomb at Parknabinnia, County Clare, showed high levels of Mesolithic ancestry. Clearly, Neolithic farmers sometimes integrated the hunters into their communities.
On whether the results could apply to other geographic regions, Tom Booth explained: "The evidence we have from earlier periods of the Neolithic in Britain and Ireland suggests that there was a looser link between tombs and families.
"People who belonged to particular paternal lineages were more often buried in megalithic tombs in these periods, but lower occurrences of close biological relatives suggest that familial links don't give us the whole story. Social developments leading to strong associations between families and megalithic tombs may have been specific to later Neolithic societies in Ireland."
Follow Paul on Twitter.