A new regime of relativistic high-order harmonic generation has been discovered (Pirozhkov 2012 Phys. Rev. Lett. 108 135004). Multi-terawatt relativistic-irradiance (>1018 W cm−2) femtosecond (~30–50 fs) lasers focused to underdense (few × 1019 cm−3) plasma formed in gas jet targets produce comb-like spectra with hundreds of even and odd harmonic orders reaching the photon energy of 360 eV, including the 'water window' spectral range. Harmonics are generated either by linearly or circularly polarized pulses from the J-KAREN (KPSI, JAEA) and Astra Gemini (CLF, RAL, UK) lasers. The photon number scalability has been demonstrated with a 120 TW laser, producing 40 μJ sr−1 per harmonic at 120 eV. The experimental results are explained using particle-in-cell simulations and catastrophe theory. A new mechanism of harmonic generation by sharp, structurally stable, oscillating electron spikes at the joint of the boundaries of the wake and bow waves excited by a laser pulse is introduced. In this paper, detailed descriptions of the experiments, simulations and model are provided and new features are shown, including data obtained with a two-channel spectrograph, harmonic generation by circularly polarized laser pulses and angular distribution.