Conjugation is used by bacteria to propagate antimicrobial resistance (AMR) in the environment. Central to this process are widespread conjugative F-pili that establish the connection between donor and recipient cells, thereby facilitating the spread of IncF plasmids among enteropathogenic bacteria. Here, we show that the F-pilus is highly flexible but robust at the same time, properties that increase its resistance to thermochemical and mechanical stresses. By a combination of biophysical and molecular dynamics methods, we establish that the presence of phosphatidylglycerol molecules in the F-pilus contributes to the structural stability of the polymer. Moreover, this structural stability is important for successful delivery of DNA during conjugation and facilitates rapid formation of biofilms in harsh environmental conditions. Thus, our work highlights the importance of F-pilus structural adaptations for the efficient spread of AMR genes in a bacterial population and for the formation of biofilms that protect against the action of antibiotics.