Gene transfer is a major contributing factor to functional innovation in genomes. Endosymbiotic gene transfer (EGT) is a specific instance of lateral gene transfer (LGT) in which genetic materials are acquired by the host genome from an endosymbiont that has been engulfed and retained in the cytoplasm. Here we present a comprehensive approach for detecting gene transfer within a phylogenetic framework. We applied the approach to examine EGT of red algal genes into Thalassiosira pseudonana, a free-living diatom for which a complete genome sequence has recently been determined. Out of 11,390 predicted protein-coding sequences from the genome of T. pseudonana, 124 (1.1%, clustered into 80 gene families) are inferred to be of red algal origin (bootstrap support >or= 75%). Of these 80 gene families, 22 (27.5%) encode novel, unknown functions. We found 21.3% of the gene families to putatively encode non-plastid-targeted proteins. Our results suggest that EGT of red algal genes provides a relatively minor contribution to the nuclear genome of the diatom, but the transferred genes have functions that extend beyond photosynthesis. This assertion awaits experimental validation. Whereas the current study is focused within the context of secondary endosymbiosis, our approach can be applied to large-scale detection of gene transfer in any system.