According to genetic tests, the Ainu people belong mainly to Y-DNA haplogroup D2 (a haplogroup that is found uniquely in and frequently throughout Japan including Okinawa with its closest relations being Tibetans and Andaman Islanders in the Indian Ocean). On the paternal side, the vast majority (87.5%) of the Ainu were, according to a 2004 study to be of Asian-specific YAP+ lineages (Y-haplogroups D-M55* and D-M125), that were only distributed in the Japanese Archipelago. The Ainu exhibited no other Y-haplogroups (i.e. none of the common East Asian C-M8, O-M175*, and O-M122* haplogroups) and shared no other Y-DNA in common in mainland Japanese and Okinawans.
According to a 2005 study, haplogroup D originated in Eurasia OR in sub-Saharan Africa, but reached higher frequency outside of Africa and during the human migration out of Africa,