We compute the contribution from clusters of galaxies to the diffuse neutrino and γ−ray background. Due to their unique magnetic-field configuration, cosmic rays (CRs) with energy ≤1017 eV can be confined within these structures over cosmological time scales, and generate secondary particles, including neutrinos and gamma-rays, through interactions with the background gas and photons. We employ three-dimensional (3D) cosmological magnetohydrodynamical (MHD) simulations of structure formation to model the turbulent intergalactic and intracluster media. We propagate CRs in these environments using multi-dimensional Monte Carlo simulations across different redshifts (from z∼5 to z=0), considering all relevant photohadronic, photonuclear, and hadronuclear interactions. We also include the cosmological evolution of the CR sources. We find that for CRs injected with a spectral index 1.5−2.7 and cutoff energy Emax=1016−1017 eV, clusters contribute to a substantial fraction of the diffuse fluxes observed by the IceCube and Fermi-LAT, and most of the contribution comes from clusters with M>1014M⊙ and redshift z<0.3. We also estimated the multimessenger contributions from the
local galaxy cluster.
