  It is usually thought that long-duration gamma-ray bursts (GRBs) are
associated with massive star core collapse, whereas short-duration GRBs are
associated with mergers of compact stellar binaries. The discovery of a
kilonova associated with a nearby (350 Mpc) long-duration GRB-GRB 211211A,
however, indicates that the progenitor of this long-duration GRB is a compact
object merger. Here we report the Fermi-LAT detection of gamma-ray ($>100 {\rm
\ MeV}$) afterglow emission from GRB 211211A, which lasts $\sim$20,000 s after
the burst, the longest event for conventional short-duration GRBs ever
detected. We suggest that this gamma-ray emission results from afterglow
synchrotron emission. The soft spectrum of GeV emission may arise from a
limited maximum synchrotron energy of only a few hundreds of MeV at
$\sim$20,000 s. The unusually long duration of the GeV emission could be due to
the proximity of this GRB and the long deceleration time of the GRB jet that is
expanding in a low-density circumburst medium, consistent with the compact
stellar merger scenario.
