Xylella fastidiosa, an important phytopathogenic bacterium, causes serious plant diseases including Pierce's disease of grapevine. It is reported here that type I and type IV pili of X. fastidiosa play different roles in twitching motility, biofilm formation and cell-cell aggregation. Type I pili are particularly important for biofilm formation and aggregation, whereas type IV pili are essential for motility, and also function in biofilm formation. Thirty twitching-defective mutants were generated with an EZ : : TN transposome system, and several type-IV-pilus-associated genes were identified, including fimT, pilX, pilY1, pilO and pilR. Mutations in fimT, pilX, pilO or pilR resulted in a twitch-minus phenotype, whereas the pilY1 mutant was twitching reduced. A mutation in fimA resulted in a biofilm-defective and twitching-enhanced phenotype. A fimA/pilO double mutant was twitch minus, and produced almost no visible biofilm. Transmission electron microscopy revealed that the pili, when present, were localized to one pole of the cell. Both type I and type IV pili were present in the wild-type isolate and the pilY1 mutant, whereas only type I pili were present in the twitch-minus mutants. The fimA mutant produced no type I pili. The fimA/pilO double mutant produced neither type I nor type IV pili.