Type IV pili (Tfps) are filamentous surface appendages expressed by Gram-negative microorganisms and play numerous roles in bacterial cell biology. Tfp biogenesis machineries are highly conserved and resemble protein secretion and DNA uptake systems. Although components of Tfp biogenesis systems have been identified, it is not known how they interact to form these machineries. Using the bundle-forming pilus (BFP) of enteropathogenic Escherichia coli as a model Tfp system, we provide evidence of a cytoplasmic membrane subassembly of the Tfp assembly machine composed of putative cytoplasmic nucleotide-binding and cytoplasmic membrane proteins. A combination of genetic, biochemical and biophysical approaches revealed interactions among putative cytoplasmic nucleotide-binding proteins BfpD and BfpF and cytoplasmic membrane proteins BfpC and BfpE of the BFP biogenesis machine. The polytopic membrane protein BfpE appears to be a central component of this subassembly as it interacts with BfpC, BfpD and BfpF. We report that BFP biogenesis probably requires interactions among BfpC, BfpD and BfpE, whereas BFP retraction requires interaction of the PilT-like putative ATPase BfpF with a conserved domain of BfpE. BfpE is the first protein that is not a member of the PilT family to be implicated in Tfp retraction. Furthermore, we found that the putative ATPases BfpD and BfpF play antagonistic roles in BFP biogenesis and retraction, respectively, by interacting with distinct domains of the BFP biogenesis machine.