Which physical law governs the safety margin against the energy released by transient magnetar flares across vast cosmic distances?

Answer

The inverse square law for radiation intensity.

The transient threat posed by magnetar flares, which involve high-energy electromagnetic radiation like gamma rays, is governed by how radiation intensity dissipates over distance. For electromagnetic radiation spreading spherically from a source, the intensity follows the inverse square law ($I imes 1/r^2$). While the initial energy output of a flare is colossal—sometimes equaling centuries of solar output in milliseconds—this intensity decay provides the safety margin that keeps Earth safe from magnetars thousands of light-years away, provided the flare isn't perfectly aimed and the distance is sufficient.

Which physical law governs the safety margin against the energy released by transient magnetar flares across vast cosmic distances?
physicsstarradiationmagnetic fieldmagnetar