The genome of a man who lived on the western coast of Greenland some 4,000 years ago has been decoded, thanks to the surprisingly good preservation of DNA in a swatch of his hair so thick it was originally thought to be from a bear.

This is the first time the whole genome of an ancient human has been analyzed, and it joins the list of just eight whole genomes of living people that have been decoded so far. It also sheds new light on the settlement of North America by showing there was a hitherto unsuspected migration of people across the continent, from Siberia to Greenland, some 5,500 years ago.

The Greenlander belonged to a Paleo-Eskimo culture called the Saqqaq by archaeologists. Using his genome as a basis, a team of researchers from the University of Copenhagen determined that the Saqqaq man’s closest living relatives were the Chukchis, people who live at the easternmost tip of Siberia. His ancestors split apart from Chukchis some 5,500 years ago, according to genetic calculations, implying that the Saqqaq people’s ancestors must have traveled across the northern edges of North America until they reached Greenland.

The team, led by Morten Rasmussen and Eske Willerslev of the University of Copenhagen, decoded the genome from four tufts of hair dug out of the permafrost at Qeqertasussuk, on the west coast of Greenland. The hair was excavated in 1986 and kept in a plastic bag in the National Museum of Denmark. It was found with other waste, and the scientists speculate that it was the result of a haircut.