Magma intrusions and eruptions commonly produce abrupt changes in seismicity far from magma conduits1-4 that cannot be associated with the diffusion of pore fluids or heat5. Such 'swarm' seismicity also migrates with time, and often exhibits a 'dog-bone'-shaped distribution3, 4, 6-9. The largest earthquakes in swarms produce aftershocks that obey an Omori-type (exponential) temporal decay10-12, but the duration of the aftershock sequences is drastically reduced, relative to normal earthquake activity7, 13. Here we use one of the most energetic swarms ever recorded to study the dependence of these properties on the stress imparted by a magma intrusion8, 11, 14, 15. A 1, 000-fold increase in seismicity rate and a 1, 000-fold decrease in aftershock duration occurred during the two-month-long dyke intrusion. We find that the seismicity rate is proportional to the calculated stressing rate, and that the duration of aftershock sequences is inversely proportional to the stressing rate. This behaviour is in accord with a laboratory-based rate/state constitutive law16, suggesting an explanation for the occurrence of earthquake swarms. Any sustained increase in stressing rate-whether due to an intrusion, extrusion or creep event-should produce such seismological behaviour.