Background: Gene 3 protein (g3p), a minor coat protein from bacteriophage fd mediates infection of Escherichia coli bearing an F-pilus. Its N-terminal domain (g3p-D1) is essential for infection and mediates penetration of the phage into the host cytoplasm presumably through interaction with the Tol complex in the E. coli membranes. Structural knowledge of g3p-D1 is both important for a molecular understanding of phage infection and of biotechnological relevance, as g3p-D1 represents the primary fusion partner in phage display technology. Results: The solution structure of g3p-D1 was determined by NMR spectroscopy, The principal structural element of g3p-D1 is formed by a six-stranded beta barrel topologically identical to a permutated SH3 domain but capped by an additional N-terminal oc helix. The presence of structurally similar domains in the related E. coli phages, Ike and I2-2, as well as in the cholera toxin transducing phage ctx phi is indicated. The structure of g3p-D1 resembles those of the recently described PTB and PDZ domains involved in eukaryotic signal transduction. Conclusions: The predicted presence of similar structures in membrane penetration domains from widely diverging filamentous phages suggests they share a conserved infection pathway. The widespread hydrogen-bond network within the beta barrel and N-terminal a helix in combination with two disulphide bridges renders g3p-D1 a highly stable domain, which may be important for keeping phage infective in harsh extracellular environments.