  We examine Fermi-type acceleration at relativistic shocks, and distinguish
between the initial boost of the first shock crossing cycle, where the energy
gain per particle can be very large, and the Fermi process proper with repeated
shock crossings, in which the typical energy gain is of order unity. We
calculate by means of numerical simulations the spectrum and angular
distribution of particles accelerated by this Fermi process, in particular in
the case where particle dynamics can be approximated as small-angle scattering.
We show that synchrotron emission from electrons or positrons accelerated by
this process can account remarkably well for the observed power-law spectra of
GRB afterglows and Crab-like supernova remnants. In the context of a
decelerating relativistic fireball, we calculate the maximum particle energy
attainable by acceleration at the external blast wave, and discuss the minimum
energy for this acceleration process and its consequences for the observed
spectrum.
