  Quantum theory predicts that entanglement can also persist in macroscopic
physical systems, albeit difficulties to demonstrate it experimentally remain.
Recently, significant progress has been achieved and genuine entanglement
between up to 2900 atoms was reported. Here we demonstrate 16 million genuinely
entangled atoms in a solid-state quantum memory prepared by the heralded
absorption of a single photon. We develop an entanglement witness for
quantifying the number of genuinely entangled particles based on the collective
effect of directed emission combined with the nonclassical nature of the
emitted light. The method is applicable to a wide range of physical systems and
is effective even in situations with significant losses. Our results clarify
the role of multipartite entanglement in ensemble-based quantum memories as a
necessary prerequisite to achieve a high single-photon process fidelity crucial
for future quantum networks. On a more fundamental level, our results reveal
the robustness of certain classes of multipartite entangled states, contrary
to, e.g., Schr\"odinger-cat states, and that the depth of entanglement can be
experimentally certified at unprecedented scales.

Quantum Physics;Atomic Physics;Optics