Unresolved anisotropies of the cosmic near-infrared background radiation are expected to have contributions from the earliest galaxies during the epoch of reionization and from faint, dwarf galaxies at intermediate redshifts. Previous measurements were unable to pinpoint conclusively the dominant origin because they did not sample spatial scales that were sufficiently large to distinguish between these two possibilities. Here we report a measurement of the anisotropy power spectrum from subarcminute to one-degree angular scales, and find the clustering amplitude to be larger than predicted by the models based on the two existing explanations. As the shot-noise level of the power spectrum is consistent with that expected from faint galaxies, a new source population on the sky is not necessary to explain the observations. However, a physical mechanism that increases the clustering amplitude is needed. Motivated by recent results related to the extended stellar light profile in dark-matter haloes, we consider the possibility that the fluctuations originate from intrahalo stars of all galaxies. We find that the measured power spectrum can be explained by an intrahalo light fraction of 0.07 to 0.2 per cent relative to the total luminosity in dark-matter haloes of 10(9) to 10(12) solar masses at redshifts of about 1 to 4.