We calculate the cyclotron-radiation spectrum for relativistic electrons wi
th an anisotropic distribution in which the velocity spread across the magn
etic held is much less than the speed of light. If the cyclotron feature in
the spectrum of Her X-l is assumed to be due to such electrons, the implie
d magnetic field is (4-6) x 10(10) G, in good agreement with other observat
ional and theoretical estimates. The observed temporal variation of the ene
rgy of the cyclotron lines in the spectra of some pulsars can be explained
by variability of the mean longitudinal velocity of the electrons, which de
creases with increasing luminosity due to increase of the radiative deceler
ation of the flow.