We present exactly simultaneous X-ray and TeV monitoring with RXTE and HEGRA of the TeV blazar Mrk 501 during 15 days in 1998 June . After an initial period of very low flux at both wavelengths , the source underwent a remarkable flare in the TeV and X-ray energy bands , lasting for about six days and with a larger amplitude at TeV energies than in the X-ray band . At the peak of the TeV flare , rapid TeV flux variability on sub-hour timescales is found . Large spectral variations are observed at X-rays , with the 3–20 keV photon index of a pure power law continuum flattening from \Gamma = 2.3 to \Gamma = 1.8 on a timescale of 2–3 days . This implies that during the maximum of the TeV activity , the synchrotron peak shifted to energies \gtrsim 50 keV , a behavior similar to that observed during the longer-lasting , more intense flare in 1997 April . The TeV spectrum during the flare is described by a power law with photon index \Gamma = 1.9 and an exponential cutoff at \sim 4 TeV ; an indication for spectral softening during the flare decay is observed in the TeV hardness ratios . Our results generally support a scenario where the TeV photons are emitted via inverse Compton scattering of ambient seed photons by the same electron population responsible for the synchrotron X-rays . The simultaneous spectral energy distributions ( SEDs ) can be fit with a one-zone synchrotron-self Compton model assuming a substantial increase of the magnetic field and the electron energy by a factor of 3 and 10 , respectively .