Many ATP- and GTP-binding proteins have a phosphate-binding loop (P-loop), the primary structure of which typically consists of a glycine-rich sequence followed by a conserved lysine and a serine or threonine. The three-dimensional structures of several ATP- and GTP-binding proteins containing P-loops have now been solved. In this review current knowledge of P-loops is discussed with the additional aim of illustrating the fascinating relationship between protein sequence, structure and function.