  Updated formation and structure models of Jupiter predict a metal-poor
envelope. This is at odds with the two to three times solar metallicity
measured by the Galileo probe. Additionally, Juno data imply that water and
ammonia are enriched. Here we explore whether Jupiter can have a deep radiative
layer separating the atmosphere from the deeper interior. The radiative layer
could be caused by a hydrogen-transparency window or depletion of alkali
metals. We show that heavy-element accretion during Jupiter's evolution can
lead to the desired atmospheric enrichment and that this configuration is
stable over billions of years. The origin of the heavy elements could be
cumulative small impacts or one large impact. The preferred scenario requires a
deep radiative zone due to a local reduction of the opacity at $\sim$ 2000 K by
$\sim$ 90%, which is supported by Juno data, and vertical mixing through the
boundary with a similar efficiency to molecular diffusion ($D \lesssim 10^{-2}$
cm$^2$/s). Therefore, most of Jupiter's molecular envelope could have solar
composition while its uppermost atmosphere is enriched with heavier elements.
The enrichment likely originates from the accretion of solid objects. This
possibility resolves the long-standing mismatch between Jupiter's interior
models and atmospheric composition measurements. Furthermore, our results imply
that the measured atmospheric composition of exoplanets does not necessarily
reflect their bulk compositions. We also investigate whether the enrichment
could be due to the erosion of a dilute core and show that this is highly
unlikely. The core-erosion scenario is inconsistent with evolution
calculations, the deep radiative layer, and published interior models.
