Abstract While observations have suggested that power-law electron energy spectra are a common outcome of strong energy release during magnetic reconnection, e.g., in solar flares, kinetic simulations have not been able to provide definite evidence of power-laws in energy spectra of nonrelativistic reconnection. By means of 3D large-scale fully kinetic simulations, we study the formation of power-law electron energy spectra in nonrelativistic low-β reconnection. We find that both the global spectrum integrated over the entire domain and local spectra within individual regions of the reconnection layer have power-law tails with a spectral index p ∼ 4 in the 3D simulation, which persist throughout the nonlinear reconnection phase until saturation. In contrast, the spectrum in the 2D simulation rapidly evolves and quickly becomes soft. We show that 3D effects such as self-generated turbulence and chaotic magnetic field lines enable the transport of high-energy electrons across the reconnection layer and allow them to access several main acceleration regions. This leads to a sustained and nearly constant acceleration rate for electrons at different energies. We construct a model that explains the observed power-law spectral index in terms of the dynamical balance between particle acceleration and escape from main acceleration regions, which are defined based upon a threshold for the curvature drift acceleration term. This result could be important for explaining the formation of power-law energy spectrum in solar flares.