The nature of the pseudogap phase is a central problem in the effort to understand the high-transition-temperature (high-Tc) copper oxide superconductors1. A fundamental question is what symmetries are broken when the pseudogap phase sets in, which occurs when the temperature decreases below a value T*. There is evidence from measurements of both polarized neutron diffraction2, 3 and the polar Kerr effect4 that time-reversal symmetry is broken, but at temperatures that differ significantly from one another. Broken rotational symmetry was detected from both resistivity measurements5 and inelastic neutron scattering6, 7, 8 at low doping, and from scanning tunnelling spectroscopy9, 10 at low temperature, but showed no clear relation to T*. Here we report the observation of a large in-plane anisotropy of the Nernst effect in YBa2Cu3Oy that sets in precisely at T* throughout the doping phase diagram. We show that the CuO chains of the orthorhombic lattice are not responsible for this anisotropy, which is therefore an intrinsic property of the CuO2 planes. We conclude that the pseudogap phase is an electronic state that strongly breaks four-fold rotational symmetry. This narrows the range of possible states considerably, pointing to stripe or nematic order11, 12.