Recent genome-wide association studies have revealed associations between many genetic variants and complex conditions. Using related individuals in these studies has been shown to enhance their power, as well as to avoid spurious results due to confounding effects. In particular, pedigree analysis can provide higher power for detecting rare variants than an association study involving unrelated individuals. A key ingredient in association studies is imputation and inference of haplotypes from genotype data. When related individuals are considered, current haplotype inference methods do not scale to whole-genome datasets, and their accuracy is limited when considering complex pedigrees with several founding lineages. In this paper, we present algorithms for efficient haplotype inference and imputation. Our method, PhyloPed, leverages the perfect phylogeny model, resulting in an efficient method with high accuracy. In addition, PhyloPed effectively combines the founder haplotype information from different lineages and is immune to inaccuracies in prior information about the founders.