  Long gamma-ray bursts (GRBs) are at present well confirmed sites of
acceleration of particles to relativistic energies due to observations of
gamma-ray emission in the GeV-TeV energy range. We consider a scenario in which
the mechanism accelerating electrons is also responsible for acceleration of
hadrons in the GRB jets to multi-PeV energies. Since progenitors of long GRBs
are massive stars still immersed in dense stellar clusters, these hadrons can
efficiently interact with the matter after escaping from the jet. We calculate
the spectra of neutrinos from the interaction of those hadrons with the matter
of a huge cloud surrounding GRB. Those neutrinos form an afterglow on a time
scale determined by their diffusion time scale in the cloud. Due to this long
delay, their identification with any specific GRB is not possible. We estimate
contribution of neutrinos from such afterglows to the extragalactic neutrino
background recently reported by the IceCube Observatory.
