The production of neutrons carrying at least 20% of the proton beam energy (x L > 0.2) in e + p collisions has been studied with the ZEUS detector at HERA for a wide range of Q 2 , the photon virtuality, from photoproduction to deep inelastic scattering. The neutron-tagged cross section, ep → e ′ Xn, is measured relative to the inclusive cross section, ep → e ′ X, thereby reducing the systematic uncertainties. For x L > 0.3, the rate of neutrons in photoproduction is about half of that measured in hadroproduction, which constitutes a clear breaking of factorisation. There is about a 20% rise in the neutron rate between photoproduction and deep inelastic scattering, which may be attributed to absorptive rescattering in the γp system. or 0.64 < x L < 0.82, the rate of neutrons is almost independent of the Bjorken scaling variable x and Q 2 . However, at lower and higher x L values, there is a clear but weak dependence on these variables, thus demonstrating the breaking of limiting fragmentation. The neutron-tagged structure function, F