First-order Fermi acceleration in collisionless shocks is supposed to operate in the central regions of active galactic nuclei (AGNs). Most of the shock energy is channeled into relativistic protons. Protons are effectively "cooled" as a result of interactions with the soft radiation produced by accreting matter. Among final products of such collisions are ultra-high-energy photons. For a certain range of parameters, we find that a substantial part of these photons leak out of the central region. They are absorbed by radio photons within 1 pc or escape much further, being uniformly absorbed within 10-30 kpc by the background microwave radiation. The above outcome depends upon the compactness of the central source. In both cases ultrarelativistic pairs are created. These pairs cool by means of synchrotron radiation in the interstellar magnetic field and form either compact hard γ-ray sources (~10^4^-10^6^ MeV) or extended X-ray and γ-ray halos (0.01-100 MeV) around AGNs. Detection of such radiation would strongly support the hypothesis that proton-photon injection of ultrarelativistic pairs is responsible for nonthermal radiation from AGNs.