A kilonova, resulting from the collision of two neutron stars, could pose a major threat to Earth-like planets, even at significant interstellar distances.
A kilonova about 16 light-years from Earth could generate enough of an X-ray afterglow to ionize our atmosphere and pose a risk to life on Earth.