Close to optimal doping, the copper oxide superconductors show 'strange metal' behaviour, suggestive of strong fluctuations associated with a quantum critical point. Such a critical point requires a line of classical phase transitions terminating at zero temperature near optimal doping inside the superconducting 'dome'. The underdoped region of the temperature-doping phase diagram from which superconductivity emerges is referred to as the 'pseudogap' because evidence exists for partial gapping of the conduction electrons, but so far there is no compelling thermodynamic evidence as to whether the pseudogap is a distinct phase or a continuous evolution of physical properties on cooling. Here we report that the pseudogap in YBa2Cu3O6+δ is a distinct phase, bounded by a line of phase transitions. The doping dependence of this line is such that it terminates at zero temperature inside the superconducting dome. From this we conclude that quantum criticality drives the strange metallic behaviour and therefore superconductivity in the copper oxide superconductors.