Magnetic reconnection is important to the dynamics of many astrophysical and fusion plasmas but our understanding of it is incomplete. Petaflop-scale simulations of the evolution of turbulent magnetic reconnection in a three-dimensional plasma indicate that it proceeds in a way that is dramatically different from classical theory. Magnetic reconnection releases energy explosively as field lines break and reconnect in plasmas ranging from the Earth’s magnetosphere to solar eruptions and astrophysical applications. Collisionless kinetic simulations have shown that this process involves both ion and electron kinetic-scale features, with electron current layers forming nonlinearly during the onset phase and playing an important role in enabling field lines to break1,2,3,4. In larger two-dimensional studies, these electron current layers become highly extended, which can trigger the formation of secondary magnetic islands5,6,7,8,9,10, but the influence of realistic three-dimensional dynamics remains poorly understood. Here we show that, for the most common type of reconnection layer with a finite guide field, the three-dimensional evolution is dominated by the formation and interaction of helical magnetic structures known as flux ropes. In contrast to previous theories11, the majority of flux ropes are produced by secondary instabilities within the electron layers. New flux ropes spontaneously appear within these layers, leading to a turbulent evolution where electron physics plays a central role.