  We present a detailed study of the gamma-ray emission from the direction of
the star-forming region W30 based on a decade of the Fermi Large Area Telescope
data in the 0.3-300 GeV photon energy range. The morphological and spectral
analyses allow us to resolve the gamma-ray emission into two extended
structures from different origins. One of them mostly overlaps with the
supernova remnant (SNR) G8.7-0.1 and has a soft spectrum that resembles with
the spectra of other middle-aged SNRs interacting with molecular clouds. The
other shows remarkable spatial and spectral consistency with the TeV emission
from HESS J1804-216, and its spectrum could be naturally explained by inverse
Compton scattering of electrons like a number of TeV gamma-ray emitting pulsar
wind nebulae. Thus we attribute this source to the nebula around the pulsar PSR
J1803-2137.
