SummaryIn filamentous cyanobacteria, the mechanism of gliding motility is undefined but posited to be driven by a polysaccharide secretion system known as the junctional pore complex (JPC). Recent evidence implies that the JPC is a modified type IV pilus-like structure encoded for in part by genes in the hps locus. To test this hypothesis, we conducted genetic, cytological and comparative genomics studies on hps and pil genes in Nostoc punctiforme, a species in which motility is restricted to transiently differentiated filaments called hormogonia. Inactivation of most hps and pil genes abolished motility and abolished or drastically reduced secretion of hormogonium polysaccharide, and the subcellular localization of several Pil proteins in motile hormogonia corresponds to the site of the junctional pore complex. The non-motile ΔhpsE-G strain, which lacks three glycosyltransferases that synthesize hormogonium polysaccharide, could be complemented to motility by the addition of medium conditioned by wild-type hormogonia. Based on this result, we speculate that secretion of hormogonium polysaccharide facilitates but does not provide the motive force for gliding. Both the Hps and Pil homologs characterized in this study are almost universally conserved among filamentous cyanobacteria, with the Hps homologs rarely found in unicellular strains. These results support the theory that Hps and Pil proteins compose the JPC, a type IV pilus-like nanomotor that drives motility and polysaccharide secretion in filamentous cyanobacteria.