Mergers of neutron stars are known to be associated with short gamma-ray bursts(1-4). If the neutron-star equation of state is sufficiently stiff (that is, the pressure increases sharply as the... Show moreMergers of neutron stars are known to be associated with short gamma-ray bursts(1-4). If the neutron-star equation of state is sufficiently stiff (that is, the pressure increases sharply as the density increases), at least some such mergers will leave behind a supramassive or even a stable neutron star that spins rapidly with a strong magnetic field(5-8) (that is, a magnetar). Such a magnetar signature may have been observed in the form of the X-ray plateau that follows up to half of observed short gamma-ray bursts(9,10). However, it has been expected that some X-ray transients powered by binary neutron-star mergers may not be associated with a short gamma-ray burst(11,12). A fast X-ray transient (CDF-S XT1) was recently found to be associated with a faint host galaxy, the redshift of which is unknown(13). Its X-ray and host-galaxy properties allow several possible explanations including a short gamma-ray burst seen off-axis, a low-luminosity gamma-ray burst at high redshift, or a tidal disruption event involving an intermediate-mass black hole and a white dwarf(13). Here we report a second X-ray transient, CDF-S XT2, that is associated with a galaxy at redshift z = 0.738 (ref.(14)). The measured light curve is fully consistent with the X-ray transient being powered by a millisecond magnetar. More intriguingly, CDF-S XT2 lies in the outskirts of its star-forming host galaxy with a moderate offset from the galaxy centre, as short gamma-ray bursts often do(15,16). The estimated event-rate density of similar X-ray transients, when corrected to the local value, is consistent with the event-rate density of binary neutron-star mergers that is robustly inferred from the detection of the gravitational-wave event GW170817. Show less