Bacteriophage T4 has a very efficient mechanism for infecting cells. The key component of this process is the baseplate, located at the end of the phage tail, which regulates the interaction of the tail fibres and the DNA ejection machine. A complex of gene product (gp) 5 (63K) and gp27 (44K), the central part of the baseplate, is required to penetrate the outer cell membrane of Escherichia coli and to disrupt the intermembrane peptidoglycan layer, promoting subsequent entry of phage DNA into the host. We present here a crystal structure of the (gp5-gp27)3 321K complex, determined to 2.9 A resolution and fitted into a cryo-electron microscopy map at 17 A resolution of the baseplate-tail tube assembly. The carboxy-terminal domain of gp5 is a triple-stranded beta-helix that forms an equilateral triangular prism, which acts as a membrane-puncturing needle. The middle lysozyme domain of gp5, situated on the periphery of the prism, serves to digest the peptidoglycan layer. The amino-terminal, antiparallel beta-barrel domain of gp5 is inserted into a cylinder formed by three gp27 monomers, which may serve as a channel for DNA ejection.