The effective action for type II string theory compactified on a six torus is N = 8 supergravity, which is known to have an E 7 duality symmetry. We show that this is broken by quantum effects to a discrete subgroup, E 7 (Z), which contains both the T-duality group O(6, 6; Z) and the S-duality group SL(2; Z). We present evidence for the conjecture that E 7 (Z) is an exact 'U-duality' symmetry of type II string theory. This conjecture requires certain extreme black hole states to be identified with massive modes of the fundamental string. The gauge bosons from the Ramond-Ramond sector couple not to string excitations but to solitons. We discuss similar issues in the context of toroidal string compactifications to other dimensions, compactifications of the type II string on K 3 ×T 2 and compactifications of eleven-dimensional supermembrane theory.