Eighteen Years of Kilonova Discoveries with Swift

Swift has now completed 18 years of mission, during which it discovered thousands of gamma-ray bursts (GRBs) as well as new classes of high-energy transient phenomena. Its first breakthrough result was the localization of short duration GRBs, which enabled for redshift measurements and kilonova searches. Swift, in synergy with the Hubble Space Telescope and a wide array of ground-based telescopes, provided the first tantalizing evidence of a kilonova in the aftermath of a short GRB. In 2017, Swift observations of the gravitational wave event GW170817 captured the early UV photons from the kilonova AT2017gfo, opening a new window into the physics of kilonovae. Since then, Swift has continued to expand the sample of known kilonovae, leading to the surprising discovery of a kilonova in a long duration GRB. This article will discuss recent advances in the study of kilonovae driven by the fundamental contribution of Swift.

The Neil Gehrels Swift mission (hereafter Swift) [26] played a fundamental role in the discovery and characterization of the first kilonovae. Swift, launched on November 20, 2004, was primarily designed to chase GRBs and localize their rapidly fading afterglow [27][28][29]. The satellite is equipped with a wide-field hard X-ray (15-150 keV) monitor, the Burst Alert Telescope (BAT) [30], that continuously scans the sky searching for new bursts. Once a GRB is discovered, the satellite rapidly slews to its position and, within a couple of minutes, begins observations in the X-ray, ultraviolet (UV) and optical bands with its narrow field instruments, the X-ray Telescope (XRT) [31] and the UltraViolet/Optical Telescope (UVOT) [32], respectively. This strategy has led to the accurate localization of thousands of GRBs and, in particular, was key to localize short duration GRBs, measure their distance scale, and enable searches for kilonovae with sensitive optical and near-infrared facilities [33,34].
The identification of kilonovae in a sample of nearby short GRBs [35][36][37][38][39][40][41] provides direct evidence that these bursts are produced by the merger of two compact objects. Unexpectedly, signatures of kilonova emission were also found in a small number of nearby long GRBs [42][43][44][45][46][47][48], upending the standard paradigm that links the GRB duration to its progenitor system. In fact, the canonical classification of GRBs in two phenomenological classes, long duration/soft spectrum bursts and short duration/hard spectrum bursts [49], is often translated into a dichotomy of their progenitor systems, collapsing massive stars and NS mergers, respectively. Whereas this tidy scheme seems to hold for the majority of events, the large sample of well-localized Swift bursts demonstrated that each phenomenological class is a heterogeneous mix of different astrophysical phenomena involving both young and evolved stellar populations [50].
In addition to its premiere role in GRB studies, Swift naturally became a workhorse facility for the follow-up of GW sources thanks to its multi-wavelength coverage, rapid response and flexible schedule. Thus far, Swift observations of GW sources were performed either as rapid large-scale tiling of GW error regions or as single pointings of candidate counterparts identified by other facilities [51][52][53][54][55]. This led to the detection of the early UV emission from the kilonova AT2017gfo [54], associated with the binary NS merger GW170817 [56].
As the sensitivity of the GW detectors improves and the rate of detectable events (as well as their distance from us) increases, the detection and identification of the associated kilonova emission becomes a daunting task [e.g., 57]. The ideal scenario would be for BAT to trigger on a gamma-ray transient associated with the GW source. This could be either the standard prompt GRB emission, if the GRB outflow is pointed toward Earth (on-axis), or a weaker high-energy signal, if the outflow is misaligned (off-axis) as in the case of GW170817. Shock-breakout flares [58,59], precursors [60], and temporally extended emission [61] could be visible from a wider range of viewing angles, and potentially aid gamma-ray monitors in the discovery of off-axis explosions. A BAT trigger would deliver an arcminute localization of the GW transient and initiate sensitive observations at X-ray and UV/optical wavelengths with Swift's narrow field instruments. These early-time observations have great diagnostic power. X-rays probe the non-thermal radiation from the fastest ejecta and can place initial constraints on the relativistic outflow and its orientation [54,[62][63][64]. As demonstrated by the case of GW170817, they are also essential to estimate the afterglow contribution at lower energies, thus aiding in the kilonova identification. Moreover, during the first few hours after the merger, the kilonova emission from the hot, sub-relativistic ejecta peaks at UV and optical wavelengths. Its luminosity depends on the ejecta composition and morphology, and is sensitive to the nature of the merger remnant and the properties of the relativistic outflow [65][66][67][68][69][70][71]. Joint GW/BAT triggers, although expected to be rare, would provide us with a treasure trove of information on infant kilonovae that is unlikely to be collected through standard GW follow-up.
In this paper, I will review recent advances in the study of kilonovae driven by the contribution of Swift. Section 2 focuses on Swift observations of GW sources with particular regard to the UVOT detection of the kilonova AT2017gfo. Section 3 discusses the discovery and status of kilonovae associated with GRBs.

Kilonovae associated with gravitational wave counterparts
In its early years, Swift operated during the observing runs of the Laser Interferometer Gravitational-Wave Observatory (LIGO) in its initial configuration (November 2005 -September 2007) and enhanced configuration (July 2009 -October 2010). During the latter run, Swift performed the first follow-up observations of candidate GW sources [72], but none of the candidates turned out to be a real astrophysical event and no electromagnetic counterpart was found.
Thanks to an increased sensitivity, Advanced LIGO, followed a couple of years later by Advanced Virgo, ushered in a new era of gravitational wave astronomy which began with the discovery of the first binary BH merger (GW150914; [73]) and culminated with the first multi-messenger observations of a binary NS merger (GW170817; [74]). Unfortunately, at the time of the merger, the location of GW170817 was occulted by the Earth and its associated GRB170817A could not be seen by the BAT. Nonetheless, Swift responded to the alert and began observations of the field within 1 hr since the GW trigger, first by tiling the probability peak of the GRB localization, then by targeting known nearby galaxies within the refined GW localization [54,75]. However, none of these early observations covered NGC4993, the host galaxy of the GW source.
As the first candidate counterparts from ground-based imaging were publicly released, Swift began pointed observations of the most promising sources, and ultimately settled for the target Swope Supernova Survey 17a [76], later confirmed to be the counterpart of GW170817 and dubbed AT2017gfo.
XRT and UVOT observations of AT2017gfo began 0.6 d after the GW trigger, providing key spectral information for the classification of the transient. Swift/UVOT detected a bright UV and optical counterpart (Figure 1) characterized by a rapid temporal decay, F ν ∝ t −1.1 , and a steep spectral index, F ν ∝ ν −4 . These properties are different from those observed at optical and nIR wavelengths. The steep spectral index and chromatic behavior are not typical of GRB afterglows at this stage of their evolution. An afterglow origin was further disfavored by the lack of an X-ray counterpart down to a 3 σ limit of ≲ 10 −13 erg cm −2 s −1 at 1 d post-merger [54].  [54]. Data are corrected for Galactic extinction along the line of sight, and compared with a range of temporal models. An empirical power-law function is used to illustrate the decay of the u and w1 measurements. Three possible kilonova models were compared to the m2 data: one with light r-process elements (solid line), one with light and heavy r-process elements (shaded area), and one including the effects of jet/ejecta interactions (dashed line).
The early behavior of AT2017gfo is instead well described by a thermal spectrum with temperature T ≈7,300 K at 0.6 d and emitting radius R ≈ 6 × 10 14 cm at 0.6 d [54]. According to this model, the bolometric luminosity of the blackbody component is L p ≈ 6 × 10 41 erg s −1 and its peak is t p ≲0.6 d. These two quantities can be used for a rough estimate of the ejecta physical properties, such as its total mass M ej and expansion velocity v ej , using a simple analytical model [77,78]: where α ≈1.3 is the nuclear energy generation rate [5,79] and κ is the opacity of the ejecta, which must be low in order to explain the bright UV emission.
If entirely powered by radioactive decay energy, the luminosity and timescale of the UV emission imply a relatively large mass (≈ 0.015M ⊙ ) of fast-moving (≈0.3c) low-opacity ejecta, hard to explain through the standard channels of mass ejection in compact binary mergers [4,6,80,81]. Although a widespread consensus interprets the UV counterpart of GW170817 as kilonova emission, these results appear in tension with our common understanding of NS mergers. Viewing angle effects and uncertainties in the heating rate could alleviate this discrepancy [82,83]. Alternatively, the UV/optical luminosity could be boosted if the merger ejecta gets re-energized either by a long-lived NS remnant [84] or by its interactions with the relativistic outflow [65,70].
Early time UV observations of infant kilonovae would be crucial to distinguish between different models and probe the ejecta composition [67,71]. This is illustrated in Figure 1 where the UVOT m2 light curve of AT2017gfo is compared with different kilonova models. The effects of jet/ejecta interactions would make the kilonova look bluer and brighter (dashed line) than basic radioactively powered models (solid line). Heavy r-process elements, if present, would instead suppress the UV emission, leaving detectable imprint in the kilonova light curve and spectrum [66,67]. Swift/UVOT observations of future GW counterparts can potentially fill this knowledge gap if an accurate localization is promptly available. Imaging of the kilonova in its early stages would distinguish between pure radioactive models and those requiring an additional energy source. However, spectroscopy is ultimately necessary to characterize the ejecta composition [e. g. [85][86][87][88]. The predicted range of kilonova luminosities and distance scales are not within the reach of the UVOT grism spectrograph [89], and would require ultra-rapid observations with the Hubble Space Telescope (HST). In the immediate future, the ideal scenario to make these observations possible would be a joint GW/BAT trigger, capable of delivering a precise position of the GW source within minutes. In the longer term, the launch of a wide-field UV monitor, such as the Ultraviolet Transient Astronomy Satellite (ULTRASAT) [90], would increase the prospects for an early kilonova detection [91].

Kilonovae associated with short GRBs
One of the most enduring notion in the GRB field is that bursts of short duration are produced by mergers of compact objects. This link was spectacularly demonstrated by the detection of GW170817 and its associated short duration GRB170817A [74]. In its first 18 years of mission (2004-2022), Swift has detected over 130 short-duration, hard-spectrum GRBs. These are defined by the criteria T 90 < 2s and HR > 1, where the duration T 90 is the time interval over which 90% of the broadband (15-150 keV) fluence is measured, and the hardness ratio HR is the fluence ratio between the hard band (100-150 keV) and the soft (50-100 keV) band [92,93]. This legacy dataset is the most valuable tool to probe the properties of compact binary mergers and their associated kilonovae across cosmic time.
Of the ∼130 short hard GRBs observed by Swift, ≈70% were localized by the XRT, and only 7% were also detected in at least one of the Swift/UVOT filters, typically the broad white filter. These UVOT-detected short bursts have inferred redshifts in the range between 0.111 [94] and 2.609 [95] with a median of z ≈0.9, consistent with the general population of short GRBs [96].

Kilonovae in the nearby Universe
The discovery of GRB170817A and its delayed X-ray afterglow [64,97] showed that the local population of NS mergers would likely appear as low-luminosity short GRBs with no bright X-ray counterpart at early times. Thus, archival data from Swift were reanalyzed in a new light in an attempt to find local bursts similar to GRB170817A. This led to the identification of GRB150101B as a possible cosmological analogue [40], characterized by a late-peaking afterglow and an early optical emission consistent with a bright blue kilonova ( Figure 2). Its prompt gamma-ray properties were also considered similar, in some aspects, to GRB170817A [98]. Its low gamma-ray energy and long lived X-ray emission are characteristic traits of a GRB jet seen far from its axis (off-axis).  Modeling of the X-ray afterglow points to an energetic jet (E k,iso ≈10 53 erg) with a narrow core (θ c ≈3 deg), seen from an angle of θ v ≈13 deg [40]. For comparison, the viewing angle inferred for GRB170817A is approximately 20-25 deg [63,97,99]. This model shows that the afterglow contribution at optical wavelengths is sub-dominant at t ≲ 2 d (dashed lines, Figure 2), suggesting that the observed optical counterpart is mostly powered by kilonova emission (shaded area, Figure 2). The candidate kilonova in GRB150101B has an optical luminosity L o ≈ 2 × 10 41 erg s −1 at 1.5 d, that is roughly 2 times brighter than AT2017gfo at the same epoch. It provided the first evidence, later confirmed by other short GRBs (Section 3.2), that the early blue emission of AT2017gfo is not unusual and could be a rather common component of kilonovae. However, as in the case of AT2017gfo, this luminous optical emission implies a massive (≳ 0.02M ⊙ ) low-opacity (κ ≲1 cm 2 g −1 ) ejecta in rapid expansion (≳0.15c), whose origin is not fully understood.
Based on the experience of GRB170817A and GRB150101B, subsequent searches for offaxis afterglows mainly focused on short GRBs without an early X-ray detection [100][101][102], as this sample could potentially harbor other off-axis short GRBs in the nearby universe. A third of Swift short bursts lack an X-ray counterpart, and are localized by BAT with an accuracy of a few arcminutes. These BAT localizations were cross-correlated with galaxy catalogs [e.g. 103] and, in a handful of cases, were found to intercept a known nearby galaxy. In general, the BAT localization error is too large to robustly identify the GRB host galaxy. However, the number of matches between short GRBs with no X-ray afterglow and nearby galaxies is slightly higher than the value expected from spurious alignments [101], the probability to recover the same number of matches by chance being ≈2%. This lends support to the hypothesis that at least some of these GRBs were hosted in nearby galaxies, constraining the local event rate to ≲160 Gpc −3 yr −1 [101]. Among the candidate local GRBs, a notable example is the short duration (T 90 ≈0.6 s) GRB190610A [104], which occurred during operations of the two LIGO detectors and was localized by BAT close to a nearby (≈165 Mpc) galaxy. Unfortunately, the target's position was too close to the Sun and could not be promptly observed. It was also not optimal for GW detectors, which only reached a distance horizon of 63 Mpc for a NS merger progenitor [105].
Thus far, these tentative associations between GRBs and local galaxies were not confirmed by any other observational evidence. In particular, no evidence for a bright kilonova was found in archival data, either from Swift/UVOT or ground-based imaging [101]. The available limits are sparse and mostly obtained in the UV/optical range, thus are not sufficient to rule out the presence of a kilonova fainter or redder than AT2017gfo. Long-term radio monitoring of these bursts can potentially constrain their distance scale by detecting the late-time synchrotron afterglow arising from the interaction of the kilonova ejecta with the surrounding medium [100,102,[106][107][108][109].
Explosions seen slightly off-axis, like GW170817, are the most promising targets for studying the early kilonova behavior, which is otherwise outshone by the standard afterglow. As Swift continues to operate and new facilities, such as SVOM (Space-based multi-band astronomical Variable Objects Monitor; [110]) and Einstein Probe [111], come online, observing campaigns targeting candidate off-axis GRBs could confirm their local origin and identify their kilonovae.

Kilonovae at cosmological distances
The majority of Swift short bursts lie at cosmological distances, where events like GRB170817A are too faint to be detected. Therefore, the observed population is dominated by on-axis explosions, that is those with a relativistic jet pointing toward Earth. Detection of the non-thermal afterglow emission from this jet enables for a rapid and accurate GRB localization [33]. However, the bright afterglow tends to outshine any other emission component at all wavelengths, and represents one of the main challenges in the identification of a kilonova. Other factors affecting the search for kilonovae are the presence of dust along the sightline, contamination from the host galaxy light, and the GRB distance scale. Their effect is discussed in more detail below.
Dust extinction is estimated through the study of the UV/optical and near-infrared (nIR) afterglow spectral energy distribution (SED). The afterglow is characterized by a broadband synchrotron spectrum, which, over a narrow energy range, can be approximated as a power-law function, F ν ∝ ν −α . On its way to us, the intrinsic power-law shape is modified by dust effects, which mainly suppress the UV and optical flux. Therefore, the amount of extinction A V along the line of sight can be measured by comparing the observed spectral shape with the expected power-law model [e.g. [112][113][114]. Due to the faintness of short GRB afterglows, the available dataset is sparse and allows for a direct measurement of A V in just a few cases [e.g. 94,[115][116][117][118][119][120][121].
An indirect inference of the dust content along the sightline can be derived from X-ray spectroscopy [122,123]. Soft X-rays are absorbed by the intervening gas, generally quantified in terms of the equivalent hydrogen column density N H . This measurement can be related to the optical extinction by assuming a gas-to-dust ratio comparable to the Galactic one, N H ≈ 2.69 × 10 21 A V [124].  The distribution of extinction values, calculated with both these methods, is reported in Figure 3, and shows that a modest amount of dust is present in short GRB environments. This is sufficient to redden the optical spectrum as kilonovae do. Therefore, a red color of the GRB afterglow does not represent unambiguous evidence for a kilonova: two or more epochs of multi-color observations are crucial to track the spectral evolution and disentangle the effects of dust from a genuine kilonova.
The GRB location within its host galaxy is another factor affecting the identification of kilonovae. This observational bias disfavors the detection of kilonovae in the inner galactic regions in two ways. First, contamination from the galaxy's light is higher in these regions and affects our practical capabilities to resolve the transient against the background. Second, according to the canonical fireball model [19,29,126], the afterglow brightness depends on the density of the surrounding environment as ∝ n 1/2 0 , which tends to be higher near the galactic core [127,128]. Indeed, the sample of short GRB afterglows displays a trend of brightness versus galactocentric offset [96] and, as mentioned above, bright afterglows hinder the identification of kilonovae. Fortunately, short GRBs are widely spread around their galaxies, and only about one third is located within 0.5" from the galaxy's center [34,96,129].
Finally, a major obstacle in the discovery of new kilonovae has been the GRB distance scale. Bright kilonovae can be detected with HST up to z ∼ 0.5, whereas ground-based telescopes can probe them up to z ≲ 0.25. Although the median redshift typically quoted for short GRBs is z ∼ 0.5, this value is derived from measured redshifts and only places a lower limit to the true distance distribution of short GRBs: most bursts with unknown redshift are likely harbored in distant (z ≳1) galaxies [96,130] for which spectroscopic measurements are often unsuccessful. When accounting for this population of events, the median distance scale of short GRBs tends to z ≈1. Therefore, only a small fraction of bursts are sufficiently close for a kilonova detection. For instance, during Swift's lifetime, approximately 100 short GRBs were localized to arcsecond accuracy, but only ≈20 events were found at z ≲0.5, and less than 10 at z <0.25. A list of these bursts and their properties is reported in Table 1.  [33,39,40,94,96,115,116,118,119,129,[131][132][133][134][135][136][137] The first group of bursts (Group 1) is characterized by a robust galaxy association, quantified by the chance coincidence probability P cc ≲2% [138]. The second group of bursts (Group 2) is characterized by a higher probability of a spurious association, either because of their larger localization error or because the putative host galaxy lies several arcseconds away from the GRB position (hostless bursts). The reported redshift is the value measured for the galaxy with the lowest P cc , but it cannot be excluded that the true host is a faint galaxy at higher redshift. If two galaxies have comparable probability to be the host, then both their redshifts are listed. Although it is unlikely that all the GRB/galaxy associations in Group 2 are spurious, results based on a single burst should be interpreted with caution.
In Table 1 we consider candidate kilonovae those cases with a robust redshift measurement and a significant optical/nIR excess above the non-thermal afterglow. Other cases in which the optical luminosity falls within the kilonova range are considered possible kilonovae. However, uncertainties in the distance scale or in the afterglow contribution prevent a clear identification of the kilonova component.
The rest-frame optical and near-infrared light curves of these bursts are shown in Figure 4 and Figure 5, respectively. For comparison, the light curve of the kilonova AT2017gfo is also shown.  Short GRBs are often observed using the r or i filters, therefore the optical light curves were directly derived from the available dataset. After correcting for Galactic extinction in the burst direction [140], the k-correction to rest-frame r-band was calculated using the redshift reported in Table 1 and the observed spectral slope [141], then a correction for intrinsic extinction at the GRB site was estimated using a Milky Way extinction law [142]. If the optical counterpart was detected only in one filter, a spectral slope of 0.6 was used for the k-correction, and no correction for the unknown intrinsic extinction was applied. Coverage at near-infrared wavelengths is sparser and often consists of upper limits. When no detection was available, the nIR light curve was extrapolated from the optical and X-ray data using the measured spectral slope.
At optical wavelengths, AT2017gfo is characterized by an early peak, M r ∼ −16 at about 12 hr [76,[143][144][145], and fast evolving timescales. In some nearby (z ≈ 0.2) GRBs, the optical emission falls in the range of kilonova luminosities and can be used to constrain the kilonova properties. A diverse range of behaviors emerges from these observations: a possible kilonova component is visible in 6 short GRBs (∼30%) although only one event (GRB160821B) closely resembles AT2017gfo [116]. In the case of GRB061201, GRB080905A and GRB070809, the observed light curve, if powered by a kilonova, would require earlier peak times and a faster decay rate than AT2017gfo. In a few bursts (∼10%), including GRB050509B and GRB130822A, deep optical limits rule out a kilonova similar to AT2017gfo [33,146]. In all other cases (∼60%), the limits are unconstraining either due to the bright afterglow or to the shallow depth of the observations. In particular, no useful constraint is derived for z ≳0.2. Exploring kilonovae at farther distances would require a combination of rapid reaction timescales (≲1 d) and depth (≲27 AB mag), achievable with the next generation of ground-based telescopes.
Searches in the near-infrared appear more promising. The kilonova peaks a few days after the merger when the afterglow has significantly faded. The outflow collimation, which determines the time of the jet-break, plays a significant role in shaping the late-time afterglow evolution. Bursts with bright afterglows and late jet-breaks, like GRB051221A (dotted gray line in Figure 5), are not suitable for kilonova searches. GRB130603B instead was a good target because of its early jet-break at ∼0.5 days. Kilonovae span a range of nIR luminosities: from GRB130603B, which is brighter than AT2017gfo by a factor of ≈2 (solid black line in Figure 5), to GRB160821B, which is fainter than AT2017gfo by a factor of ≈2 (note that the data in Figure 5 include both the afterglow and the kilonova contribution). The only other useful constraint comes from GRB160624A [115], which rules out a kilonova as bright as AT2017gfo.
Despite sustained efforts over the last decade, the available nIR dataset for short GRBs remains limited. Even for the closest events at z ≈0.1, the range of kilonova luminosities is challenging for any ground-based observatories. However, it is within reach of space-based facilities such as HST, JWST, and the planned Roman Space Telescope. The detections of GRB130603B and GRB160821B as well as the constraining upper limit from GRB160624A were all obtained by HST. The advent of JWST can potentially accelerate progress in this area. Thanks to its unprecedented sensitivity, JWST can detect a kilonova similar to AT2017gfo up to z ∼1, thus allowing us to probe several short GRBs per year rather than one every few years. However, these observations would require reaction timescales of 2-3 days and are therefore limited by the small number of disruptive Targets of Opportunity.
In order to derive constraints on the ejecta mass, composition, and velocities, each event was compared to a broad grid of simulated kilonova light curves [68]. These models include emission from two components: a toroidal-shaped (T) outflow with low electron fraction Y e , which represents the robust r-process composition of dynamical ejecta; and a high-Y e component with either spherical (S) or poloidal (P) geometry to reproduce a wind outflow. The latter includes two possible compositions, one with Y e =0.37 (wind1) and a second one with Y e =0.27 (wind2). Due to the presence of a gamma-ray signal, viewing angles that are far off-axis (θ v > 20 • ) were not included. A total of 1,800 simulations were compared to the data adding a 1 mag systematic error to account for uncertain opacities and nuclear physics. The results of this comparison are summarized in Figure 6.
Existing kilonovae candidates and possible kilonovae from short GRBs tend to favor large wind ejecta masses (≳0.01 M ⊙ ), whereas upper limits place only mild constraints (≲0.03 M ⊙ at the 90% confidence level). The velocity of the wind ejecta is not well constrained in most cases. As expected, GRBs with a possible early onset of the kilonova (e.g. GRB061201, GRB070809) favor larger velocities (≈0.15c). A slight preference for the spherical wind geometry (TS) is observed, although both morphologies can adequately reproduce the dataset. The existing sample is mostly driven by optical observations acquired at early times (≲7 d), thus the properties of the low-Y e outflow (dynamical ejecta) are only loosely constrained and are not reported in Figure 6. Furthermore, no preference is found for any of the two compositions of the wind outflow. Therefore, whereas short GRBs confirm that kilonovae and light r-process production commonly take place in NS mergers, the existing dataset is not sufficient to constrain the presence of elements heavier than A ≳ 130 (second and third-peak r-process elements). These studies would greatly benefit from observations in the nIR band (rest-frame) capable of tracking the kilonova emission on longer timescales. Below short GRBs with a possible kilonova component are discussed in more detail.
GRB130603B: this event provided the first evidence for a late-time infrared signal, brighter and redder than any afterglow models [37,41,117,147]. Three key factors contributed to the discovery: the early-time multi-color observations, which constrained the afterglow colors and the amount of dust along the sightline; the rapid fading of the bright non-thermal afterglow; the late-time HST observations, which were essential to detect the nIR excess. Although the dataset, consisting of a single detection in the F160W filter (broad H), is limited and does not rule out alternative models, such as dust echoes [148,149], the kilonova is generally considered the most likely explanation. If interpreted as a kilonova, the nIR emission would be more luminous than AT2017gfo at a similar epoch and require a large mass of ejecta (≳ 0.03M ⊙ ; Figure 6).
This candidate kilonova was also associated with a late-time X-ray signal, in excess to the standard afterglow [117]. However, this measurement, based on XMM-Newton observations, was possibly contaminated by a neighbooring X-ray source, visible in archival Chandra observations (ObsIDs 22400 and 23160, PI: Fong) and located at RA, Dec (J2000) = 11:28:48.34, +17:04:07.23. This is approximately 10" from the GRB position and within the typical resolution of the EPIC/pn camera aboard XMM-Newton. The observed X-ray flux of this source is 1.4 +0. 8 −0.6 ×10 −15 erg cm −2 s −1 and comparable to the flux measured by XMM-Newton a few days after the GRB. This significantly weakens the evidence for late-time X-ray emission associated with kilonovae.
GRB160821B: a rich multi-wavelength dataset, including X-ray, radio, optical and nIR imaging, allowed for a detailed modeling of its non-thermal afterglow and the identification of a red excess in its light curve [37][38][39]150,151]. This event was studied by different groups and, although the methodologies were different, the general consensus is that the observed infrared counterpart is due to a kilonova. The color and timescales match the evolution of AT2017gfo. An optical excess consistent with a blue kilonova is marginally detected at early times. To date, GRB160821B remains one of the best sampled kilonova light curves in a short GRB, and allows for tight constraints on the ejecta properties. Its comparison with kilonova simulations [68] yields M w ≈0.01 M ⊙ and M d ≈0.003 M ⊙ for the wind and dynamical ejecta, respectively. GRB061201: this event displays a shallow decay of the optical counterpart and marginal evidence for spectral evolution, from β OX =0.50±0.10 at 1 hr to β OX =0.82±0.15 at 10 hr [94]. The main uncertainty in the interpretation of this feature is the GRB distance scale. The only direct constraint on the redshift, z ≲1.5, comes from the detection of the UV counterpart and leaves open several interpretations: a distant burst at z ≈1, a nearby burst in the intra-cluster environment at z=0.084, or a nearby burst kicked out of its host galaxy at z=0.111. In the latter two cases, the observed spectral change could be interpreted as a faint and blue kilonova on top of the standard afterglow [35,36].
GRB070809: the optical counterpart of this burst displays a red color (g − R ≈1), and appears brighter than the extrapolation of the non-thermal X-ray emission. This provides some evidence for a kilonova component [36]. Also in this case, the true GRB distance scale is uncertain, and the kilonova model holds only if the GRB is relatively close, favoring the association with the spiral galaxy at z ∼ 0.2, located 5.9" away from the GRB position [118]. However, a single epoch of multi-color observations is not sufficient to rule out other explanations, such as a high-redshift and/or dusty environment. Multi-epoch observations are critical to detect the rapid color variation of kilonovae and rule out other options.
GRB080905A: its optical counterpart is generally interpreted as standard afterglow [131]. However, given the fast decay rate of the early X-ray emission (F X ∝ t −2.4 ) and the lack of an X-ray detection after 1,000 s, the afterglow contribution at late times remains unconstrained. It cannot be excluded that the optical counterpart is powered, at least in part, by a kilonova fainter than AT2017gfo. The lack of X-ray and nIR constraints at late times prevents a firm conclusion. Its low optical luminosity favors a low mass of wind ejecta (M w ≲0.003 M ⊙ in 68% of the simulations). However, an additional factor of uncertainty is introduced by the GRB distance scale. Although the chance alignment between GRB080905A and the nearby spiral galaxy is small (P cc ≈ 1%), a faint (F160W ≈26 AB mag) galaxy lies only 0.7 arcsec away, and has a comparably low P cc ≈ 8% [129].
GRB090515: like GRB080905A, this burst is characterized by a fast-fading X-ray afterglow (F X ∝ t −9 ) and a weak optical counterpart [152]. Due to the limited dataset and uncertain distance scale, the nature of the optical emission (afterglow or kilonova) remains unclear. If placed at redshift z ∼0.403, its optical luminosity is comparable to AT2017gfo and implies M w ≈0.01-0.03 M ⊙ in 85% of the simulations.

Kilonovae associated with hybrid long GRBs
Swift observations were pivotal to identify a new class of GRBs with hybrid highenergy properties [61,153]. These bursts display a long lasting (>>2 s) prompt gamma-ray emission, but share many other features typical of short GRBs, such as a negligible spectral lag [154] and a short variability timescale [155]. A distinctive feature of these bursts is the morphology of their gamma-ray light curve, composed by a short duration, hard spectrum burst, followed by a lull, then by a weaker temporally extended and spectrally soft emission. For this reason, these bursts are often referred to as "short GRBs with extended emission" [61]. However, not all the examples of hybrid long GRBs fit into this phenomenological description. The two most notable exceptions are GRB060614 [50,153] and GRB211211A [42][43][44]156].
Hints for this subclass of GRBs were found in the BATSE data [61,157], but it is only thanks to Swift that evidence for their different nature clearly emerged: the lack of a bright supernova [42,43,158,159] disfavor a massive star progenitor, whereas their heterogeneous sample of host galaxies as well as their offset distribution link them to older stellar systems [96,160,161]. The most direct link to compact binary mergers is represented by the possible kilonova emission in a small sample of nearby bursts [45][46][47][48]162,163], and convincingly identified in GRB211211A [42][43][44].
The list of nearby hybrid long GRBs and their properties are reported in Table 2. The duration T 90 was calculated in two energy bands: the standard Swift/BAT range (15-150 keV) and the BATSE range (50-300 keV) used for the traditional GRB classification [49]. It shows that most of these bursts would have been classified as standard short GRBs by BATSE, except for GRB060614 and GRB211211A. The exceptionally bright and longlasting gamma-ray phase of these two bursts sets them apart from the population of short GRBs with extended emission. It remains unclear whether they represent an extreme manifestation of the same phenomenon or a distinct subclass. The small size of the sample (less than half the sample of Table 1) may indicate an intrinsically low rate of events, or may also reflect the challenging classification of these bursts. For instance, Table 2 shows a noticeable gap between 2008 and 2018, unlikely to be a statistical fluctuation. Additional hybrid long GRBs may have been discovered and misclassified as standard bursts. For example, GRB111005A, GRB210704A, GRB211227A were discussed in the literature [168][169][170], and more recently the very bright GRB230307A, at a putative redshift of 0.065 [171], is being investigated. However, to date, no systematic search for similar events has been performed. Table 2 have an X-ray afterglow, and only 2 lack an optical counterpart. Swift/UVOT detections were reported for GRB180618A [167] and for the three closest events, namely GRB060505, GRB060614, and GRB211211A. In the latter two cases, the detection in all 6 UVOT filters (v, b, u, uvw1, uvm2, uvw2) helped constrain the GRB distance scale (z ≲ 1.5) directly from the afterglow data, and ruled out high values of dust extinction along the line of sight [42,172]. Swift/UVOT data also helped break the degeneracy between the low-redshift (z ∼ 0.3) and high-redshift (z ∼ 1) origin of GRB 150424A [36,173], favoring the latter. For this reason, this GRB is not reported in Table 2.

All the bursts in
Searches for an associated supernova were carried out for half of the sample, and resulted in non-detections (Figure 7, top panel). For bursts at z < 0.2 the limits are orders of magnitude fainter than SN1998bw [174] and rule out most known core-collapse SNe. The rest-frame optical light curves of these bursts are shown in Figure 7 (bottom panel) and compared to the kilonova AT2017gfo. Among the nearby events, only GRB211211A and GRB060505 are characterized by luminosities and timescales consistent with AT2017gfo. High-energy (≳100 MeV) emission was detected in coincidence with GRB211211A, and interpreted either as standard afterglow [175] or external Compton emission of the kilonova photons [176]. The optical light curves of GRB050709 and GRB060614 are instead longer lived than AT2017gfo: they include a substantial afterglow contribution, however a possible red excess was identified at ≈13 d in GRB060614 [46,47] and at ≈7-10 d in GRB050709 [45]. This excess emission, if interpreted as a kilonova, is consistent with models producing hot and massive (M ej ∼ 0.05 − 0.1M ⊙ ) ejecta in fast (v ∼ 0.2 c) expansion [177].
Events at z > 0.2 display optical counterparts orders of magnitude brighter than AT2017gfo, and are plausibly dominated by afterglow emission. An alternative possibility to explain optical luminosities larger than ≳ 10 42 erg s −1 is energy injection from a longlived central engine, which heats up and accelerates the merger ejecta [68,84,162,178,179]. Sustained energy injection could in fact be the culprit of the long lasting gamma-ray emission characterizing this class of events. If the merger remnant is a highly magnetized and rapidly spinning NS (magnetar) [180][181][182], then part of its rotational energy could be transferred to the ejecta via a neutrino-driven wind emerging from the NS before its collapse into a BH. The resulting thermal emission would be significantly enhanced and brighter than transients purely powered by r-process nucleosynthesis. This model, applied to GRB180618A [167], GRB050724A, and GRB061006A [162], can reproduce their luminous optical emission for reasonable values of the magnetic field, B ≈ 5 × 10 15 G, and initial spin period, P ≈ 3-5 ms. The extreme luminosities implied by some magnetar-powered models can be constrained with wide-field optical surveys [57]. Indeed, follow-up of gravitational wave sources already probed a large portion of the allowed parameter space [183,184], suggesting that they are not the most common outcome of binary NS mergers.

Conclusions
Over a period of 18 years, Swift carried out landmark observations of GRBs and their associated kilonovae which had a far-reaching impact in nuclear and high-energy astrophysics. From the first tantalizing evidence of r-process nucleosynthesis in a short GRB to the discovery of long duration gamma-ray transients produced by compact binary mergers, Swift has redefined this field of research.
Its key capability is the rapid and accurate localization of GRBs, which enables for sensitive searches at optical and near-infrared wavelengths. At cosmological distances, typical of short GRBs, the XRT has been the main driver of Swift's discoveries. However, the UVOT proved to be invaluable to detect the first electromagnetic counterpart of a GW event. Its observations of luminous UV emission from the kilonova AT2017gfo opened novel avenues of investigations and offer new prospects for the discovery of future GW counterparts or, more in general, kilonovae in the nearby Universe.
As the mission continues to operate, its discovery potential will be expanded by the advent of modern facilities with unprecedented capabilities, such as, for example, the Vera Rubin Observatory, the James Webb Telescope and the growing network of GW interferometers. On-going and planned upgrades of the GW detectors are predicted to increase the number of well-localized (≲100 deg 2 ) GW sources by over an order of magnitude [185], thus increasing the chances for the identification of an EM counterpart. The next observing run (O4) will begin in May 2023 and is projected to last for approximately 18 months (https://observing.docs.ligo.org/plan/, accessed 15 May 2023), fully overlapping with Swift's operations. Prospects for a joint GW/EM detection during O4 remain highly uncertain, as the expected rate of well-localized NS mergers ranges between 1 and 10 yr −1 [186]. A tenfold increase in the rate may be achieved with the fifth run (O5), planned to start no earlier than 2027.