Magnetic fields play a part in almost all stages of stellar evolution. Most low-mass stars, including the Sun, show surface fields that are generated by dynamo processes in their convective envelopes. Intermediate-mass stars do not have deep convective envelopes, although 10 per cent exhibit strong surface fields that are presumed to be residuals from the star formation process. These stars do have convective cores that might produce internal magnetic fields, and these fields might survive into later stages of stellar evolution, but information has been limited by our inability to measure the fields below the stellar surface. Here we report the strength of dipolar oscillation modes for a sample of 3,600 red giant stars. About 20 per cent of...