  In energetic nonthermal sources such as gamma-ray bursts, AGN or galactic jet
sources, etc., one expects both relativistic and transrelativistic shocks
acompanied by violent motions of moderately relativistic plasma. We present
general considerations indicating that these sites are electron and positron
accelerators leading to a modified power law spectrum. The electron (or
$e^\pm$) energy index is very hard, $\propto \gamma^{-1}$ or flatter up to a
comoving frame break energy $\gamma_\ast$, and becomes steeper above that. In
the example of gamma-ray bursts the Lorentz factor reaches $\gamma_\ast\sim
10^3$ for $e^{\pm}$ accelerated by the internal shock ensemble on
subhydrodynamical time scales. For pairs accelerated on hydrodynamical
timescales in the external shocks similarly hard spectra are obtained, and the
break Lorentz factor can be as high as $\gamma_\star \siml 10^5$. Radiation
from the nonthermal electrons produces photon spectra with shape and
characteristic energies in qualitative agreement with observed generic
gamma-ray burst and blazar spectra. The scenario described here provides a
plausible way to solve one of the crucial problems of nonthermal high energy
sources, namely the efficient transfer of energy from the proton flow to an
apropriate nonthermal lepton component.
