Ferrofluids exhibit unusual hydrodynamic effects owing to the magnetic nature of their constituents. As magnetization increases, a classical ferrofluid undergoes a Rosensweig instability1and creates self-organized, ordered surface structures2or droplet crystals3. Quantum ferrofluids such as Bose-Einstein condensates with strong dipolar interactions also display superfluidity4. The field of dipolar quantum gases is motivated by the search for new phases of matter that break continuous symmetries5,6. The simultaneous breaking of continuous symmetries such as the phase invariance in a superfluid state and the translational symmetry in a crystal provides the basis for these new states of matter. However, interaction-induced crystallization in a superfluid has not yet been observed. Here we usein situimaging to directly observe the spontaneous transition from an unstructured superfluid to an ordered arrangement of droplets in an atomic dysprosium Bose-Einstein condensate7. By using a Feshbach resonance to control the interparticle interactions, we induce a finite-wavelength instability8and observe discrete droplets in a triangular structure, the number of which grows as the number of atoms increases. We find that these structured states are surprisingly long-lived and observe hysteretic behaviour, which is typical for a crystallization process and in close analogy to the Rosensweig instability. Our system exhibits both superfluidity and, as we show here, spontaneous translational symmetry breaking. Although our observations do not probe superfluidity in the structured states, if the droplets establish a common phase via weak links, then our system is a very good candidate for a supersolid ground state9-11.