  The detection of gravitational waves together with their electromagnetic
counterpart, in the gamma-ray burst GRB 170817A, marked a new era of
multi-messenger astronomy. Several theoretical models have been proposed to
explain the atypical behavior of this event. Recently, it was shown that the
multi-wavelength afterglow of GRB 170817A was consistent with a synchrotron
forward-shock model when the outflow was viewed off-axis, decelerated in a
uniform medium and parametrized through a power-law velocity distribution.
Motivated by the upper limits on the very-high-energy emission, and the
stratified medium in the close vicinity of a binary neutron star merger
proposed to explain the gamma-ray flux in the short GRB 150101B, we extend the
mechanism proposed to explain GRB 170817A to a more general scenario deriving
the synchrotron self-Compton (SSC) and synchrotron forward-shock model when the
off-axis outflow is decelerated in a uniform and stratified circumburst
density. As particular cases, we show that the delayed and long-lasting
afterglow emission observed in GRB 080503, GRB140903A, GRB 150101B, and GRB
160821B could be interpreted by a similar scenario to the one used to describe
GRB 170817A. In addition, we show that the proposed scenario agrees with the
MAGIC, Fermi-LAT and H.E.S.S upper limits on gamma-ray emission from GRB
160821B and GRB 170817A.
