Phages are viruses that infect bacteria and dominate every ecosystem on our planet. As well as impacting microbial ecology, physiology and evolution, phages are exploited as tools in molecular biology and biotechnology. This is particularly true for the Ff (f1, fd or M13) phages, which represent a widely distributed group of filamentous viruses. Over nearly five decades, Ff has seen an extraordinary range of applications, including in phage display and nanotechnology. However, the complete structure of the phage capsid and consequently the mechanisms of infection and assembly remain largely mysterious. Using cryo-electron microscopy and a highly efficient system for production of short Ff-derived nanorods, we have determined the first structure of a filamentous virus, including the filament tips. Structure combined with mutagenesis was employed to identify domains of the phage that are important in bacterial attack and for release of new phage progeny. These data allow new models to be proposed for the phage lifecycle and will undoubtedly enable the development of novel biotechnological applications.