An algorithm for discovering long shared segments of Identity by Descent (IBD) between pairs of individuals in a large population. GERMLINE takes as input genotype or haplotype marker data for individuals (as well as an optional known pedigree) and generates a list of all pairwise segmental sharing. GERMLINE uses a novel hashing & extension algorithm which allows for segment identification in haplotype data in time proportional to the number of individuals.