The international team of scientists, including researchers at Durham and Aberdeen universities, showed there was interaction between the hunter-gatherer and farming communities and a 'sharing' of animals and knowledge.
The interaction between the two groups eventually led to the hunter-gatherers incorporating farming and breeding of livestock into their culture, scientists said.
The spread of plants and animals throughout Europe between 6000 and 4000 BC involved a complex interplay between indigenous Mesolithic hunter-gatherers and incoming Neolithic farmers but the scale of the interaction and the extent to which hunter-gatherers took ideas from their neighbours remains hotly debated.
"Mesolithic hunter-gatherers definitely had dogs, but they did not practise agriculture and did not have pigs, sheep, goats, or cows, all of which were introduced to Europe with incoming farmers about 6000 BC," said lead author, Dr Ben Krause-Kyora, from Christian-Albrechts University in Kiel, Germany.
Also Read
"Having people who practised a very different survival strategy nearby must have been odd, and we know now that the hunter-gathers possessed some of the farmers' domesticated pigs," Krause-Kyora said.
It is not yet known whether the hunter-gatherers received the pigs via trade or exchange, or by hunting and capturing escaped animals.
The team analysed the ancient DNA from the bones and teeth of 63 pigs from Northern Germany which showed that the hunter-gatherers acquired domestic pigs of varying size and coat colour that had both Near Eastern and European ancestry.
"Humans love novelty, and though hunter-gatherers exploited wild boar, it would have been hard not to be fascinated by the strange-looking spotted pigs owned by farmers living nearby," said co-author, Dr Greger Larson, from the Department of Archaeology at Durham University.
The research was published in journal Nature Communications.