Type IVa pili are protein filaments essential for virulence in many bacterial pathogens; they extend and retract from the surface of bacterial cells to pull the bacteria forward with unprecedented force. They are used for attachment, swarming and twitching motility, biofilm formation, up-regulation of other virulence factors, and natural competence. The pilus is assembled by the motor subcomplex which consists of the inner membrane protein PilC and the cytoplasmic ATPase PilB. How PilB catalyzes this process is unknown, due in part to the lack of high-resolution structural information. Phylogenetic analysis of PilB-like ATPases, including GspE, PilT, BfpD, FlaI, and archaeal GspE2 revealed highly conserved residues essential for function in this family of ATPases. Here we report the structure of the core ATPase domains of Geobacter metalloreducens PilB bound to ADP and the non-hydrolysable ATP analogue, AMP-PNP, at 3.4 and 2.3 Å, respectively. Importantly, these structures were determined in non-saturating nucleotide conditions, revealing important differences in nucleotide binding between chains. Analysis of these differences revealed the sequential turnover of nucleotide by the chains, and the corresponding domain movements. Our data indicate a clockwise rotation of movement in PilB, which would support the assembly of a right-handed helical pilus. Conversely, our analysis suggests a counterclockwise rotation in PilT that would enable right-handed pilus disassembly. The proposed model provides insight into how this family of ATPases can power pilus extension and retraction with extraordinary forces.