Maintaining the proximity of centrosomes to nuclei is important in several cellular contexts, and LINC complexes formed by SUN and KASH proteins are crucial in this process. Here, we characterize the presumed Drosophila ortholog of the mammalian SUN protein, sperm-associated antigen 4 (Spag4, previously named Giacomo), and demonstrate that Spag4 is required for centriole and nuclear attachment during spermatogenesis. Production of spag4 mRNA is limited to the testis, and Spag4 protein shows a dynamic pattern of association with the germline nuclei, including a concentration of protein at the site of attachment of the single spermatid centriole. In the absence of Spag4, nuclei and centrioles or basal bodies (BBs) dissociate from each other after meiosis. This role of Spag4 in centriolar attachment does not involve either of the two KASH proteins of the Drosophila genome (Klarsicht and MSP-300), but does require the coiled-coil protein Yuri Gagarin. Yuri shows an identical pattern of localization at the nuclear surface to Spag4 during spermatogenesis, and epistasis studies show that the activities of Yuri and dynein-dynactin are downstream of spag4 in this centriole attachment pathway. The later defects in spermatogenesis seen for yuri and spag4 mutants are similar, suggesting they could be secondary to initial disruption of events at the nuclear surface.