Magnetic holes are plasma structures that trap a large number of particles in a magnetic field that is weaker than the field in its surroundings. The unprecedented high time-resolution observations by NASA’s Magnetospheric Multiscale Mission enable us to study the particle dynamics in magnetic holes in the Earth’s magnetosheath in great detail. We reveal the local generation mechanism of whistler waves by a combination of Landau-resonant and cyclotron-resonant wave-particle interactions of electrons in response to the large-scale evolution of a magnetic hole. As the magnetic hole converges, a pair of counter-streaming electron beams form near the hole’s center as a consequence of the combined action of betatron and Fermi effects. The beams ...