It is demonstrated that clusters of galaxies are able to keep cosmic r
ays for a time exceeding the age of the universe. This phenomenon reve
als itself by the production of the diffuse flux of high-energy gamma
and neutrino radiation due to the interaction of the cosmic rays with
the intracluster gas. The produced flux is determined by the cosmologi
cal density of baryons, Omega(b), if a large part of this density is p
rovided by the intracluster gas. The signal from relic cosmic rays has
to be compared with the flux produced by the late sources, which can
be considered as a background in the search for cosmic-ray production
in the past. We calculate this flux considering the normal galaxies an
d active galactic nuclei (AGNs) in the clusters as the sources of cosm
ic rays. Another potential cosmic-ray source is the shock in the gas a
ccreting to a cluster. We found that this background is relatively hig
h: the diffuse -fluxes produced by relic cosmic rays are of the same o
rder of magnitude that can be expected from AGNs in the clusters. In a
ll cases the predicted diffuse gamma-ray flux is smaller than the obse
rved one, and the diffuse neutrino flux can be seen as the small bump
at E similar to 10(6) GeV over the atmospheric neutrino flux. A bright
phase in the galaxy evolution can be a source of the relic cosmic ray
s in clusters, revealing itself by diffuse gamma and neutrino radiatio
n. We found that the observation of a signal from the bright phase is
better for an individual cluster.