Required for assembly of dynein regulatory complex (DRC) and inner dynein arm (IDA) complexes, which are responsible for ciliary beat regulation, thereby playing a central role in motility in cilia and flagella. Probably acts together with ccdc40 to form a molecular ruler that determines the 96 nanometer (nm) repeat length and arrangements of components in cilia and flagella. Not required for outer dynein arm complexes assembly. Defects are the cause of a phenotype related to primary ciliary dyskinesia (PCD). Embryos display heart-looping defects at 36 hours post-fertilization and bilateral or lack of spaw expression at the left lateral plate mesoderm in 14 somite embryos, consistent with compromised fluid flow at the Kupffer's vesicle due to impaired ciliary motility. Belongs to the CCDC39 family.