  We present a two-parameter model of the extragalactic gamma-ray background
(EGB) in the 0.1-100 GeV range as measured by the Large Area Telescope (LAT)
onboard the Fermi satellite. The EGB can be fully explained as the sum of three
distinct components, namely blazars, non-beamed AGNs (Seyfert galaxies and
QSOs), and cosmic rays from star-forming galaxies. The contribution to the
background from beamed sources is obtained by fitting the Fermi-LAT blazar
differential number counts assuming that the gamma-ray luminosity function is
directly proportional to the radio luminosity function of FRI and FRII
galaxies. The high energy emission from non-beamed AGNs is instead determined
by popular synthesis models of the observed X-ray background. Finally, the EGB
is fit by adding a third component arising from pion decay in cosmic rays,
assuming that such component is closely linked to the cosmic star formation
history. We find that blazars dominate at energies \geq 10 GeV, for E \leq 0.2
GeV the main contribution is from non-beamed AGNs, while cosmic rays are
required in between. Because of absorption due to interaction of gamma-rays
with the extra-galactic background light, our model falls short at the highest
energies probed by LAT, (\geq 70 GeV), leaving room to a possible contribution
from dark matter particle annihilation. As an example, a particle of mass ~ 0.5
TeV and cross section <{\sigma}v>~ 5*10^{-26} cm^3 s^-1 can accomodate the
data.

Cosmology and Nongalactic Astrophysics