Despite the importance of the bacterial F pilus in DNA transfer and as an entry point for phages, its structure was unknown. Costa et al. now solve the structure of two plasmid-purified F family pili — the pED208 and F pili — at 3.6 Å and 5.0 Å, respectively. Both pili, which are polymers of the pilin protein VirB2, were 87 Å in diameter with an internal lumen of 28 Å and, interestingly, also contained a phospholipid entity. Further analysis revealed that pED208 contained two major phosphatidylglycerol species, whereas F pili contained one, and that these pili are helical assemblies of protein–phospholipid units. Phosphatidylglycerol head groups line the pili lumen, which changes its electrostatic charge from positive (in the absence of phosphatidylglycerol) to moderately negative. The importance of these findings is highlighted by data showing that phosphatidylglycerol preserves pilin structure and confers an electrostatic charge that facilitates DNA transfer and phage infection through pili.