Dogs were first domesticated by European hunter-gatherers, according to a new genetic analysis of prehistoric dog remains.