Main

The origin of the heaviest elements in the Universe, specifically those formed by means of rapid neutron capture (r-process) nucleosynthesis, remains a major open question in astrophysics1,2. Given the high density of neutron-rich material needed for the r-process to occur, the collisions of neutron stars have long been a suspected source3,4 and, indeed, the observations of the kilonova associated with GW 170817 confirmed that binary neutron star (BNS) mergers are the source of at least some of the r-process material in the Universe5,6,7,8,9. However, there is growing evidence that there may be multiple sites of r-process nucleosynthesis from studies of low-metallicity galactic halo stars, dwarf galaxy and globular cluster enrichment10,11,12,13,14.

A second proposed site of the r-process is in rapidly rotating cores of massive stars that collapse into an accreting black hole, producing similar conditions as the aftermath of a BNS merger15. Theoretical simulations suggest that accretion disk outflows in these so-called ‘collapsars’ may reach the neutron-rich state required for the r-process to occur15,16. The larger mass of r-process material synthesized per event compared with BNS mergers suggests that collapsars could be a dominant source, making them a possible missing piece in our understanding of r-process enrichment in the Universe.

The discovery of the long-duration gamma-ray burst (GRB) GRB 221009A, the brightest GRB ever observed17,18,19, on 9 October 2022 at a relatively nearby redshift of z = 0.151 (ref. 47 for the inner dense component of SN 1998bw, which is consistent with our inference that the SN associated with GRB 221009A is slightly fainter than SN 1998bw at late time. Of course, assuming a different afterglow contribution in our spectrum will affect the estimated mass. Our inferred mass is consistent with the results of ref. 30, who found best-fit values from modelling the early light curve of GRB 221009A in the range MNi = 0.05–0.25 M, depending on assumptions about the host extinction, with a 99% upper limit of MNi < 0.36 M. These values are lower than most early light curve estimates for SN 1998bw43,45,47. This may indicate a lower ratio of the outer-to-inner ejecta components compared with SN 1998bw, or that a two-component model is not needed to explain the SN associated with GRB 221009A. Our results, combined with the early light curve estimates, conclusively rule out the possibility that the SN was unusually bright compared with previous GRB-SNe. This is consistent with previous sample studies that do not show a correlation between the luminosities of LGRBs and their associated supernovae24,48. Crucially, our spectroscopic detection of the SN confirms that the marginal deviation from a typical afterglow in the early light curve claimed by ref. 29 and ref. 30 was indeed due to the SN.

No signs of r-process enrichment

The identification of the SN associated with GRB 221009A allows us to constrain the presence of r-process material. One possibility is that the red excess in our spectrum consists of a combination of afterglow and emission from r-process elements. Reference 15 outlines how a collapsar with a massive transient disk can lead to r-process production. However, the observational impact of r-process material, if it is produced, is highly dependent on the degree of outward mixing. In particular, ref. 15 presents two possible scenarios: one (the ‘magnetohydrodynamic (MHD)’ case) in which 0.025 M of r-process elements are mixed uniformly throughout the SN ejecta with v < 0.15c and one (the ‘collapsar’ case) in which 0.25 M of r-process elements are confined to v < 0.015c. In both cases, 0.25 M of 56Ni is mixed in the ejecta. In the MHD case, the r-process material tracks 56Ni, whereas in the collapsar case, the r-process elements are embedded behind the 56Ni. In truth, the degree of mixing in the collapsar wind scenario is unknown, and is likely to be variable with progenitor properties and may be sufficient to mix r-process elements with the outer layers.

Although the MHD scenario has largely been ruled out by early-time observations of previous events15,49, few constraints exist on the collapsar wind scenario due to the lack of late-time NIR spectra of GRB supernovae. Before our NIRSpec spectrum of GRB 221009A, the latest NIR spectrum of a GRB-SN was that of SN 1998bw taken at +51 days, which we have shown is an excellent match to our spectrum (Fig. 3) after subtracting our best-fit afterglow power law. Here we consider the possibility that our best-fit power law overestimates the afterglow contribution and that our much later spectrum of the SN associated with GRB 221009A differs from the +51 day NIR spectrum of SN 1998bw owing to the presence of r-process signatures.

In Fig. 4, we compare our NIRSpec spectrum, with various assumptions about the afterglow contribution, to r-process enriched SN models from ref. 15 (with r-process masses up to 0.25 M). We compare with models corresponding to a phase of 95 days after explosion, the latest phase available, and shift them to the distance of GRB 221009A. At this phase, the MHD SN differs considerably from an SN without r-process enrichment, producing strong emission at ≈1.8–2.4 μm that is clearly not present in our spectrum whatever the assumption on afterglow contribution. The collapsar wind model, on the other hand, largely shows SN features from non-r-process elements, although with enhanced flux near ≈2 μm compared with what is seen in normal supernovae.

Fig. 4: Comparison with r-process models.
figure 4

Comparison of our NIRSpec spectrum of GRB 221009A with r-process enriched SN models from ref. 15 corresponding to a phase of 95 days after explosion, which is the latest phase available. We show our original spectrum without afterglow subtraction (top blue), as well as the resulting spectra after subtracting the ALMA-XRT power law (middle black) and our best-fit afterglow model (shown in Fig. 3, bottom, light blue). Our spectrum, even after accounting for the afterglow, is clearly distinct from the predictions of an MHD SN. We also do not see evidence for spectral features in our spectrum that can be linked to the collapsar wind model and not attributed to the SN.

Owing to the noise in our spectrum, we are unable to identify individual lines in this region of the spectrum, beyond the likely Mg i at λ ≈ 1.5 μm. However, we compared the overall flux level and find that assuming no afterglow contribution (that is, the original unsubtracted spectrum) leads to much higher continuum flux than the collapsar wind model for λ > 1 μm. Furthermore, the expected strong nebular SN lines are diluted with respect to the continuum (Methods), indicating an extra continuum source is present (the afterglow of the GRB). Assuming the afterglow shape and normalization given by interpolating the contemporaneous ALMA and XRT observations, we find that, overall, the spectrum is inconsistent with the collapsar wind model, which indicates that the spectrum cannot be explained by a combination of the ALMA-XRT power law and an r-process enriched SN. Given the strong resemblance to previous supernovae across the full wavelength range when assuming our best-fit afterglow power-law shape and contribution (Fig. 3), it is unlikely that flux from r-process elements are contributing significantly to our spectrum. Our observation highlights the need for a systematic survey of nebular-phase LGRB spectra across a broad range of GRB properties, in particular, in light of the recent theoretical work that correlates these properties to the degree of r-process production50,51. We additionally compare our observations to the broadband colour evolution models due to r-process enrichment from ref. 52, which further highlights the need for spectroscopy (Methods section ‘Comparison with r-process light curve models’).

Host galaxy properties

A very low-metallicity, star-forming galaxy

The host galaxy of GRB 221009A is readily apparent in our JWST/NIRCam imaging shown in Fig. 1. Consistent with analysis of the optical Hubble Space Telescope (HST) images31, we find that GRB 221009A is located 0.24 ± 0.01 arcsec (0.66 ± 0.02 kpc assuming the cosmological parameters presented in ref. 53) from the centre of its host galaxy, which appears to be a near edge-on system. From our GALFIT modelling (Methods) we find that this galaxy is well described by a single Sérsic component with index n = 1.2 ± 0.1 and effective radius re = 2.15 ± 0.07 kpc. These values represent the mean and standard deviation across the four filters. The AB magnitudes in each filter corresponding to the best-fit GALFIT models are mF115W = 21.58 ± 0.20 mag, mF200W = 20.62 ± 0.10 mag, mF277W = 20.88 ± 0.10 mag and mF444W = 21.38 ± 0.05 mag (not corrected for Milky Way extinction).

In Fig. 5, we show the global host spectrum (that is, including flux from the entire resolved spectral trace) and the spectrum at the position of GRB 221009A (see Methods for details of the spectral extractions). We also show the ‘host-only’ spectrum, which represents an estimate of the host galaxy spectrum excluding the region of the GRB. Comparing the spectrum at the position of the GRB with the host-only spectrum clearly shows that certain lines, mostly from molecular H2, are much stronger at the position of GRB 221009A.

Fig. 5: Host galaxy spectra.
figure 5

Spectrum of the total host galaxy including the site of the GRB (grey), the `host-only' spectrum excluding the GRB site (red; see Methods section ‘Late-time NIRSpec observations’) and a narrow aperture centred on the location of GRB 221009A (blue). We detect narrow H, H2, He, Fe and S emission lines from the galaxy. Importantly, we see that some narrow emission lines change in strength over this galaxy, having notably strong molecular H2 emission in the region of GRB 221009A. The continuum of the afterglow and SN component can be seen clearly in the blue spectrum as a deviation from the host-only spectrum.

We measured the global host properties by fitting the global host spectrum, as well as our NIRCam photometry and HST photometry from ref. 31, using the stellar population modelling code Prospector54 (see Methods for details of the modelling procedure). The best-fit model spectrum and photometry compared with the observed data are shown in Fig. 6. We find that the host has a stellar mass of \(\log (M/{{{{M}}}}_{\odot })=9.6{1}_{-0.04}^{+0.02}\) and low stellar and gas-phase metallicities of \(\log ({Z}_{* }/{Z}_{\odot })=-0.8{1}_{-0.05}^{+0.04}\) and \(\log ({Z}_{{{{\rm{gas}}}}}/{Z}_{\odot })=-0.9{6}_{-0.03}^{+0.09}\), respectively. This is one of the lowest metallicity environments of any LGRB, which is a class of objects that prefer low-metallicity galaxies55,56,57,58 and it is, to our knowledge, the lowest metallicity environment of a GRB-SN to date. This may suggest that very low metallicity is required to produce a very energetic GRB. In addition, the galaxy exhibits a recent star formation rate (SFR) of SFR100 Myr = 0.17 M yr−1. We also find that the galaxy exhibits a visual extinction of \({A}_{\rm{V}}=0.6{7}_{-0.07}^{+0.11}\) mag. This is consistent with our extinction constraints from the early-phase JWST data (Methods) where we found a best-fit total extinction of \({A}_{\rm{V}}=4.6{3}_{-0.64}^{+0.13}\) mag, which is in good agreement, within uncertainties, with the nominal Milky Way value plus the host galaxy extinction found here. Our SFR and host extinction values are consistent with those measured from Hα and Paα detected in an early-phase X-shooter spectrum of GRB 221009A (ref. 20).

Fig. 6: Best-fit galaxy model.
figure 6

Left, best-fit Prospector model photometry (green circles) and spectrum (green) compared with the observed photometry shown with 1σ error bars (orange circles, our NIRCam photometry and HST photometry measured by ref. 31). Right, best-fit Prospector spectrum compared with our NIRSpec spectrum (orange). The bottom panels present the residuals.

We additionally model the spectrum at the site of the GRB, and find a similar gas-phase metallicity of \(\log ({Z}_{{{{\rm{gas}}}}}/{Z}_{\odot })=-0.9{4}_{-0.06}^{+0.11}\) and a lower stellar metallicity of \(\log ({Z}_{* }/{Z}_{\odot })=-1.6{6}_{-0.10}^{+0.26}\) compared with the global host galaxy (Extended Data Fig. 6), which indicates that the progenitor of GRB 221009A originated from a low-metallicity environment.

Strong H2 emission at the explosion site

We observe many narrow H2 vibrational and rotational emission lines that appear strongest at the site of GRB 221009A, as highlighted in Fig. 5. Molecular hydrogen traces dense star-forming regions, consistent with a birth cloud of a massive stellar progenitor of a LGRB. Neglecting the afterglow itself, H2 can be excited by both shocks (driven by, for example, stellar winds or Herbig–Haro objects) or directly by fluorescence59,60. Following ref. 61, we compared the ratios of H2 lines in the range ~1.1–2.1 μm with various models of fluorescence versus collisionally excited emission from ref. 59 using a simple chi-squared metric (with appropriately propagated uncertainties). Owing to the strong detection of many lines (which are predicted to be absent in the case of collisional excitation), we find a better match to fluorescence models, which is consistent with the dominant excitation method in many low-metallicity, blue compact dwarf galaxies61. Our measured line ratios and predicted model ratios are given in Extended Data Table 2.

Only one other LGRB host, that of GRB 031203 (a relatively faint LGRB), has had a marginal detection of H2 emission62. Molecular H in absorption due to vibrational excitation has also been observed in a small number of events (see, for example, refs. 63,64). Statistical studies of GRB hosts have found that most lack vibrationally excited H2 (for example, ref. 65), which suggests that molecular H production is suppressed in LGRB hosts. It has been suggested that this suppression may be partially due to the low metallicities of the hosts66 or the ongoing star formation, leading to a strong ionizing field67. The low metallicity and modest SFR measured by Prospector suggests that the latter may lead to observable H2 emission in this event. These observations highlight the importance of the unique sensitivity and spatial resolution of the JWST when analysing the local environments of LGRB progenitors.

Conclusions

We present the detection with the JWST of an SN associated with the highly energetic event GRB 221009A. Despite being associated with the brightest GRB ever observed, the SN produced a modest amount (≈0.09 M) of radioactive 56Ni with no obvious signs of r-process nucleosynthesis. The host galaxy suggests a very low-metallicity progenitor system—one of the lowest metallicity environments of all known LGRBs. In addition, the exceptional sensitivity and spatial resolution of the JWST allows us to detect a series of multiple molecular H2 emission lines at the position of the GRB, which is an observation that has been long anticipated. A secondary site of r-process nucleosynthesis remains an open question, which can observationally be uniquely probed by late-time IR spectroscopy. Our findings motivate future JWST campaigns to examine the nebular-phase spectra of supernovae associated with LGRBs.

Methods

Imaging observations and photometry

We obtained imaging of GRB 221009A with the NIRCam using the F115W, F200W, F277W and F444W filters on 22 April 2023 starting at 07:08 UT. Each observation consisted of four dithered exposures with a total exposure time of 558 seconds. We downloaded the stage 3 pipeline products from the Mikulski Archive for Space Telescopes (MAST) for analysis. GRB 221009A is clearly detected, along with its host galaxy.

To measure the flux from GRB 221009A in each filter, we first modelled the host galaxy contribution using the galaxy profile fitting code GALFIT68. We modelled the host galaxy as a single Sérsic component. During the fit, we masked the pixels containing the light from GRB 221009A; we fitted for transient flux in a later step. The input, best-fit model and residual (best-fit model subtracted off) images are shown in Fig. 1. The residual image for the F115W filter shows no structure indicating that the galaxy light is well described by a single Sérsic component. The residual images in the three redder filters, however, exhibit remaining diffuse structure not captured by the model near the centre of the galaxy and to the northeast. Although there is no obvious evidence for such diffuse structure emanating from the position of GRB 221009A, it is plausible that GRB 221009A is co-located with a brighter region of its host galaxy that is not captured by our galaxy model. Such a determination can only be made when the transient fades.

Next, we performed point spread function (PSF) photometry on the residual images at the location of GRB 221009A. As WebbPSF only generates PSF models for use with stage 2 imaging data, we used the following custom procedure to generate drizzled PSFs for use with stage 3 data. We generated stage 2 images with model PSFs planted at the location of GRB 221009A and then ran these images through the stage 3 pipeline. We then used the drizzled PSF models for the PSF fitting of GRB 221009A. We found the following AB magnitudes in each filter: mF115W = 25.10 ± 0.05 mag, mF200W = 24.12 ± 0.11 mag, mF277W = 23.77 ± 0.05 mag and mF444W = 23.22 ± 0.08 mag (not corrected for extinction, which we assess in detail in Methods section ‘Constraints on foreground dust from early-time spectroscopy’). The uncertainties include the systematic uncertainty associated with the GALFIT modelling procedure, which we estimated by comparing PSF photometry with and without galaxy subtraction with GALFIT.

Spectroscopic observations and data reduction

Late-time NIRSpec observations

We obtained spectra of GRB 221009A on 20 April 2023 with the NIRSpec69 onboard JWST (programme 2784; principal investigator (PI), Blanchard). Our observations began at 14:40 UT, corresponding to a rest-frame phase of 167.7 days since the Fermi GBM trigger. Spectra were taken with the S200A1 fixed slit and the medium-resolution gratings G140M/F100LP and G235M/F170LP, yielding wavelength coverage in the range ~1–3 μm. For each grating and filter set-up, we used five primary dithers and a total exposure time of 10,942 seconds. Owing to the small offset of GRB 221009A from its host galaxy31, target acquisition was performed using an offset star to ensure proper centring of the source in the slit.

We downloaded and inspected the pipeline products available on the MAST. A resolved trace is clearly present in the individual stage 2 exposures and final combined stage 3 products, indicating a substantial host galaxy contribution. In addition, a compact trace spanning ~2 pixels is apparent at the red end of the G140M/F100LP spectrum and the G235M/F170LP spectrum at the expected location of GRB 221009A within the slit. This trace is also at a consistent offset from the brightest part of the resolved trace representing the centre of the host galaxy, which confirms that this unresolved trace is the spectrum of GRB 221009A.

The pipeline products available on MAST were reduced using nod-subtraction, the default background subtraction method for a point source with multiple dithered exposures. Owing to the resolved nature of the overall trace, we re-reduced the data using the JWST Science Calibration Pipeline with nod-subtraction turned off to reduce the effect of subtracting source flux from itself. We then extract the one-dimensional spectrum of GRB 221009A from our re-reduced stage 3 combined and rectified two-dimensional (2D) spectra for further analysis. The final 2D spectra are shown in Extended Data Figs. 1 and 2 (see Fig. 1 for the slit orientation).

We used the following extraction procedure to isolate the flux associated with GRB 221009A from the light of its host galaxy. We modelled the spatial profile of the overall trace as a two-component Gaussian with centres fixed at the position of GRB 221009A and the centre of the host galaxy. We fitted the total spatial profile, summed over all wavelengths, to determine the best-fit Gaussian width of each component. We then fitted this model, with widths fixed at these values, to the spatial profile at each wavelength. We also fitted for a linear background component determined from background regions located on both sides of the trace. The sum of the flux in each fitted Gaussian component thus represents the flux from GRB 221009A and its host galaxy as a function of wavelength. The resulting spectra of GRB 221009A in the G140M and G235M gratings are shown in Extended Data Figs. 1 and 2, respectively. We also show corresponding error spectra calculated from the 2D pipeline-generated error arrays for each grating. The fit to the host galaxy Gaussian component yields a ‘host-only’ spectrum.

We note that the background exhibits evidence for PSF artefacts that are potentially from a nearby bright star (the pseudoperiodic signal at pixel rows ~18–24 in the 2D frames; Extended Data Figs. 1 and 2), which is the most likely explanation given the crowded nature of the field. Owing to the difficulty of accurately modelling this component of the background, our background regions exclude those containing such artefacts. Our fitted background therefore represents the smooth underlying sky background. This may mean that the background at the location of GRB 221009A and its host galaxy is underestimated. However, we extract regions of the background containing the suspected PSF artefacts from a nearby star and find no evidence that these features are present in our extracted spectrum of GRB 221009A. In addition, the flux from these features decreases towards the spatial location of the GRB spectral trace.

Combined G140M + G235M spectrum compared with photometry

As the photometry was obtained only two days after our NIRSpec spectra, we used the photometry to check the flux calibration of the spectra. We find that the fluxes in the four NIRCam filters are an excellent match to the flux calibration of the G140M and G235M spectra. In addition, the two spectra agree in the wavelength region where the gratings overlap. In Fig. 2, we show the fluxes in each filter compared with the combined G140M + G235M spectrum.

Host galaxy spectral extractions

As seen in Extended Data Figs. 1 and 2, the host galaxy is resolved in our JWST/NIRSpec observations, extending across approximately ten rows in our 2D spectra and with numerous narrow emission lines. To study the global host properties, we extracted the entire trace including the position of the GRB. We note that there is significant variation of the strength of some emission lines across the spatial extent of the galaxy, where several lines are stronger at the position of GRB 221009A. To identify these lines and assess any potential variation in the galaxy properties at the position of the GRB, we extracted a narrow aperture centred on the position of GRB 221009A. This differs from the Gaussian decomposition procedure described in Methods section ‘Late-time NIRSpec observations’ used to isolate the GRB spectrum, as here we are not modelling and subtracting the underlying host spectrum; the goal here is to measure the host properties at the position of the GRB.

Archival NIRSpec/MIRI observations

We obtained archival spectroscopic observations of GRB 221009A from JWST, observed with NIRSpec and the MIRI on 22 Oct 2022 (programme 2782; PI, Levan and originally presented in ref. 31). These observations correspond to 13.16 and 13.2 days post burst, respectively.

At this epoch, the NIRSpec observations were taken in the low-resolution PRISM mode, with spectral coverage from ~0.5 μm to ~5.5 μm. The pipeline products from MAST reveal a clear, high signal-to-noise ratio trace in the 2D spectrum. The stage 3, reduced spectrum is consistent with that published in ref. 31, and we thus use it for analysis in this work without additional reductions.

The MIRI spectrum was taken in the low-resolution spectroscopy mode with the P750L disperser. The automatic reduction of the MIRI spectrum failed, which was likely to be due to improper selection of the afterglow trace. We used the official MIRI reduction pipeline to manually extract the spectrum from the stage 2 products, carefully selecting the correct trace and appropriate background from the nodded 2D image. At this epoch, the afterglow trace is clearly identified in the 2D spectrum and easily isolated using a simple boxcar extraction. We note that MIRI is uncalibrated below λ ≲ 4.5 μm at the time of analysis, and we therefore removed data below this wavelength of the spectrum from analysis. The MIRI observations are qualitatively consistent with those of ref. 31 and are well matched to their near-simultaneous photometric observation in F560W.

ALMA observations

Following the seven epochs of ALMA observations of GRB 221009A through programme 2022.1.01433.T (PI, Laskar), we obtained two additional epochs with the same programme on 01 March 2023 at a mean time of 15:41 UT and on 11 April 2023 at a mean time of 07:55 UT, corresponding to 143.6514 and 183.7838 days in the observer frame, respectively (≈124.80 and ≈159.67 days in the rest frame). Both observations utilized two 4 GHz wide base-bands centred at 91.5 and 103.5 GHz, respectively with J1924 − 2914 as bandpass calibrator and J1914 + 1636 as complex gain calibrator. The millimetre-band afterglow previously reported in ref. 25 was clearly detected in the pipeline-processed science-ready data products in the first of the two epochs and more weakly (≈4.7σ) detected in the second epoch. We performed photometry using imfit in the Common Astronomy Software Applications70 and find a best-fit flux density in the two epochs of (163 ± 22) μJy and (104 ± 23) μJy (including a 5% systematic flux calibration uncertainty) at a mean frequency of 97.5 GHz, along with a position of RA = 19 h 13 m 03.50 s and dec.= 1946′24.3′′ with an uncertainty of 0.1 in each coordinate (consistent across both epochs). Together with the last ALMA 97.5 GHz measurement reported in ref. 25, the temporal decline rate of the millimetre-band afterglow at ~99–188 days after the burst (observer frame) is αmm = −1.54 ± 0.08, which implies an extrapolated millimetre-band flux density of (99 ± 23) μJy at the time of the NIRSpec observations (194 days, observer frame).

Swift/XRT observations

We downloaded the count-rate light curve of the X-ray afterglow of GRB 221009A from the Swift/XRT website71. Using the spectral parameters presented in ref. 25 (Milky Way (MW) absorption of NH,MW = 5.36 × 1021 cm−2, intrinsic absorption of NH,int = 1.35 × 1022 cm−2 and photon index of ΓX = 1.8566), we converted the observed count rate to a flux density (FX) at 1 keV and obtained FX = (9.3 ± 3.5) × 10−3 μJy at \(19{6}_{-9.1}^{+5.5}\) days (observer frame; corresponding to \(170.{4}_{-7.9}^{+4.9}\) days, rest frame) after the burst. Comparing this with our ALMA observations, we find that the spectral index between the ALMA and XRT observations at the time of the NIRSpec observations (≈194 days, observer frame) is βALMA-XRT = 0.63 ± 0.03. We refer to this number elsewhere in the text as the ALMA-XRT power law, anchored to the inferred ALMA flux density of ≈0.1 mJy at the time of the NIRSpec observations.

Constraints on foreground dust from early-time spectroscopy

Given the location of GRB 221009A in the Galactic plane (b ≈ 4), we expected substantial extinction due to interstellar dust in the MW. Reference 36 estimates the MW extinction contribution to be AV = 4.10 ± 0.06, assuming the standard extinction factor RV = 3.1. As noted in ref. 72, these dust maps can be unreliable for low galactic latitudes73. Furthermore, this measurement neglects host contribution; however, given the relatively low redshift, we do not expect to easily distinguish between dust arising from either the MW or host galaxy (see, for example, the results of ref. 20). For simplicity, we neglect redshift dependence of dust.

Given the significant uncertainties expected, we opted to use the first epoch of NIRSpec/MIRI data to determine the appropriate extinction correction. We assumed that the spectrum is dominated by some unknown combination of an afterglow (power-law model) and a thermal, SN-like component. Unless r-process material is mixed significantly within the ejecta, we do not expect a red thermal component at early times. As such, we assumed that the event is dominated by a power-law afterglow at λobs ≳ 3 μm; below this wavelength, it is reasonable that a SN 1998bw-like event could contribute significant flux. We explore the systematic uncertainties associated with the extinction laws and assumptions on the SN contribution.

Few extinction laws are calibrated across the full wavelength range covered by the NIRSpec/MIRI observations; a new extinction law describing A(λ)/A(V) as a function of R(V) in the range ~0.1–30 μm has been recently presented38. We contrast this solution with the commonly used extinction law described in ref. 37 to quantify systematic uncertainty from assumptions of dust laws. Given a prescribed dust law, we simultaneously fitted the observed day 13.2 (observer frame) spectrum to a power law (Fν ∝ νβ) and extinction parameters AV and RV using a Markov chain Monte Carlo sampler implemented in emcee74. Our models have four free parameters: the overall power-law normalization (‘norm’), the power-law index β, the dust AV and RV values, and a white noise scatter term. The scatter quantifies the uncertainty in JWST flux estimates as a fraction of the flux. We assumed a wide uniform prior for all parameters except normalization, in which we assumed a log–uniform prior.

We first fitted using the dust law presented in ref. 38. Fitting all observed wavelengths λobs < 8 μm, we find β = 0.39 ± 0.01, AV = 4.37 ± 0.05 and \({R}_{\rm{V}}=3.0{7}_{-0.05}^{+0.04}\). At λ < 2 μm, we find that the residuals are consistent with 0, suggesting no contribution from an additional thermal component. We next excluded wavelengths <2 μm in the fitting process to test the possibility of contamination from either a SN-like or r-process thermal event. We find that when excluding these wavelengths, the afterglow model overestimates the blue flux.

Next, we fitted using the extinction law described in ref. 37 (that is, following the original analysis of ref. 31). Again, we emphasize that this extinction law is not calibrated for IR observations and simply extrapolates at these wavelengths. We simultaneously fitted the observed spectrum (λobs < 8 μm) to a power law and extinction model. We find β = 0.41 ± 0.01, \({A}_{\rm{V}}=4.6{3}_{-0.64}^{+0.13}\) and \({R}_{\rm{V}}=4.2{4}_{-0.64}^{+0.74}\). This is significantly different (>3σ) from the results presented in ref. 31 when only accounting for statistical uncertainties, which we attribute to a tight prior (versus our flat prior) set by those authors.

We report the results of our fits in Extended Data Table 1 and show these data, models and associated residuals in Extended Data Fig. 3. The residuals of both dust models show significant structure throughout the spectrum. We specifically compared the residuals to a spectrum of SN 1998bw taken 12 days post burst and scaled to the redshift of GRB 221009A. We note that the statistical uncertainties and systematic difference between these two dust extinction models mean that we are unable to make a conclusive statement on the SN emission from the early-time JWST spectrum. This is a different conclusion from that of ref. 31, who, given their small statistical uncertainties, rule out SN 1998bw-like thermal emission at early times.

Constraints on the afterglow contribution

Initial comparisons with previous supernovae

In Extended Data Fig. 5, we show our extinction-corrected spectrum (using the law in ref. 37 and best-fit parameters listed in Extended Data Table 1) compared with spectra of SN 1998bw40, the canonical SN Ic-BL associated with a GRB and SN 2013ge42, one of the few supernovae Ic with high S/N late-time NIR spectra, taken at +51 and +118 days after peak, respectively. To achieve complete overlap with the blue end of our spectrum, we combined the +51 day NIR spectrum of SN 1998bw with an optical spectrum taken at +73 days. We scaled the spectra of SN 1998bw and SN 2013ge to the distance of GRB 221009A and used their light curves41,42 to normalize to their brightnesses at the phase of our GRB 221009A spectrum. Our spectrum of GRB 221009A is brighter than the comparison supernovae would be and relatively featureless with a different overall spectral shape, which is consistent with significant contamination from the afterglow. Our spectrum exhibits flux increasing at λ ≳ 1.5 μm, whereas the comparison supernovae exhibit declining flux.

The emission features shown in Extended Data Fig. 4 exhibit similar, although slightly narrower, widths than the corresponding features in SN 1998bw, SN 2013ge and SN 2014ad. Owing to the lack of a late-time light curve for SN 2014ad, we scaled its spectrum to roughly match SN 1998bw for comparison purposes. In addition, the lines in our JWST spectrum are diluted in strength and exhibit a different flux ratio. This, combined with the rising flux to the red, means that there is no simple luminosity scaling that will bring our spectrum of GRB 221009A into agreement with the comparison spectra. These observations are consistent with afterglow contamination. Furthermore, the lack of many strong SN features (for example, the strong P-Cygni features near ≈1 μm, ≈1.5 μm and ≈2 μm commonly seen in supernovae39) other than the two identified (Ca ii NIR triplet and O i at ≈0.86 μm and ≈0.92 μm, respectively) indicates that the SN associated with GRB 221009A is not substantially brighter than SN 1998bw and SN 2013ge.

Constraints from contemporaneous ALMA and Swift/XRT observations

Determining the afterglow contribution is critical for constraining the presence of SN emission and a possible contribution from r-process material. First, we considered the power law formed by the ALMA and XRT observations that we obtained around the same phase as our JWST observations. We analysed the residual spectrum by subtracting off the ALMA-XRT power law from our spectrum of GRB 221009A which we show, compared with SN 1998bw and SN 2013ge, in Extended Data Fig. 5. Although the resulting spectrum matches more closely the shape of the supernovae compared to the unsubtracted spectrum, in particular at the blue end, the shape at λ ≳ 1.5 μm still exhibits rising flux substantially different from the supernovae. Given the lack of strong emission features in this region, the most likely explanation is that the ALMA-XRT power-law model does not adequately capture the afterglow contribution. In section ‘No signs of r-process enrichment’ and Methods section ‘Comparison with r-process light curve models’, we consider whether this red excess could be due to emission from r-process material.

Varying the afterglow contribution

Next we considered the best-fit power law from fitting our spectrum at λ ≳ 1.5 μm (shown in Fig. 3) and analysed how the implied SN component changes with different afterglow normalizations. We scaled the best-fit power law by factors of 0.3, 0.6, 0.9 and 1.0 to generate four potential afterglow models, subtracted them from the spectrum and compared the resulting residual spectra with SN 1998bw and SN 2013ge. In Supplementary Fig. 1, we show the residual spectra and afterglow models for the four scalings. When scaled by 0.3 and 0.6, the residual spectra still exhibit flux rising to the red, as in the unsubtracted spectrum, which indicates that these models are not likely to account for all of the afterglow flux.

In addition, there is a mismatch between the flux ratios of the expected emission lines. In other words, the detection of the Ca ii NIR triplet at the strength we see, would imply the detection of other lines at strengths that are not observed. Of course, this reasoning relies on the assumption that the SN associated with GRB 221009A should appear similar to previous supernovae Ic/Ic-BL. Indeed it is possible that this SN may not show the same features as previous events and potentially an additional component from r-process emission which we assess in section ‘No signs of r-process enrichment’ and Methods section ‘Comparison with r-process light curve models’. However, the lack of strong lines in this region indicates that the SN associated with GRB 221009A is likely to be fainter than these models suggest and the afterglow is correspondingly brighter (as found when performing a joint SN + afterglow fit; see section ‘Isolating the SN signal’), such that most emission lines are diluted with respect to the continuum and are not detectable.

If instead the best-fit power law is scaled by 0.9, the residual spectrum appears consistent with the comparison spectra and is a close match to the overall flux level of SN 1998bw. Note that this is similar to the best-fit scaling (0.94) when performing the joint SN + afterglow fit as described in ‘Isolating the SN signal’ and shown in Fig. 3. Larger afterglow contributions (for example, scaling by 1.0) yield an overall steeper slope, inconsistent with the comparison objects.

Comparison with r-process light curve models

We also considered the r-process enriched SN light curve models in ref. 52. In Supplementary Fig. 2, we show the J–H and J–K colour evolution of these models, for an SN Ic-BL with a typical simulated ejecta mass of 3.96 M, a 56Ni mass of 0.33 M, an r-process material mass of 0.03 M and various levels of r-process mixing, from no mixing to nearly fully mixed, compared with the colours of the SN component of GRB 221009A under different afterglow assumptions. We calculated J–H and J–K colours by convolving the filter bandpasses with our NIRSpec spectrum after subtracting the afterglow models. We show the resulting colours for the afterglow models considered in section ‘Constraints on the afterglow contribution’ (the ALMA-XRT power law and the best-fit power law from fitting the red end of our spectrum with various normalizations; Extended Data Fig. 5 and Supplementary Fig. 1).

The J–K colours of the afterglow-subtracted spectra match the r-process enriched models when scaling the best-fit power law by ≲0.9. Decreasing the afterglow contribution leads to more residual red light, leading to redder colours. When scaling by ≲0.6, including the ALMA-XRT model, the J–K colours, if reddened due to r-process material, would imply significant mixing. In this case, strong broad emission lines from r-process elements would be expected, as seen in the MHD model in Fig. 4 but not in our data. In addition, for a given afterglow contribution, the J–H colours imply a different degree of r-process mixing than the J–K colours, which suggests that the reddening source is not due to r-process emission.

In Supplementary Fig. 2, we also show the colours of SN 1998bw and SN 2013ge calculated from their late-time NIR spectra. SN 1998bw is notably blue—bluer even than the models without r-process—which suggests that these models do not fully capture the range of possible spectral energy distributions of typical GRB supernovae. SN 2013ge is notably red, which is consistent with the r-process enriched models for a mixing fraction of ~10%. This event, however, exhibits a clear example of carbon monoxide emission increasing the flux in the K-band. These comparisons highlight that, without spectra, other sources of reddening are difficult to disentangle from that due to r-process material. Similar conclusions have been drawn from studies of large samples of supernovae Ic-BL light curves49. We note that the spectrum of GRB 221009A after subtracting the best-fit power law scaled by 0.9, which yields a good visual match to SN 1998bw and SN 2013ge (Supplementary Fig. 1), exhibits a J–K colour that is ~0.1 mag redder than the no r-process model. However, as can be seen in Supplementary Fig. 1, there is an upturn in the spectrum in the K-band at the expected location of the first overtone carbon monoxide emission, similar to that seen in SN 2013ge.

Host galaxy modelling

We used Prospector54, a Bayesian galaxy spectral energy distribution (SED) fitting code to simultaneously fit the global host galaxy photometry and spectroscopy. Additionally, we fitted the spectrum extracted at the position of the GRB to compare the global host properties and those at the GRB position. We adopted the MIST isochrones75 and the C3K stellar spectral libraries in the Flexible Stellar Population Synthesis76,77 framework. The stellar population is described by redshift, stellar mass, velocity dispersion, stellar metallicity and a step function non-parametric star formation history with 14 time bins78. The nebular emission was parametrized by gas-phase metallicity and ionization parameter using the CLOUDY grid in ref. 79. We simultaneously fitted simple Gaussians to lines that are not included in our emission line model that assumes that all the emission is powered by the stars, namely, the He i, [Fe ii] and H2 emission lines, with the same kinematics but free amplitudes as our CLOUDY grid. We assumed a flexible two-component dust attenuation model that accounted for birth cloud and diffuse dust separately80. Variation in the shape of the attenuation curve was enabled using a power-law modification to a Calzetti curve81. We also incorporated the contribution of dust emission to the infrared photometry using a three-parameter model82. To fit the spectroscopy and photometry together, we marginalized over the shape of the observed spectrum (thereby avoiding any wavelength-dependent flux calibration issues) with a polynomial; in this manner, the normalization and shape of the SED was entirely determined by the photometry, or not constrained at all for the GRB position, where there is no photometry. We also included a jitter parameter that inflated the spectroscopy uncertainties to account for imperfect JWST flux calibration and slit losses, and found typical values of 1.5–2, which are consistent with other early JWST spectroscopic analyses83,84,85. Finally, we used a pixel outlier model to downweight pixels that were not consistent with our model86, which were typically identified at a 1–2% level. In summary, the SED model for the host galaxy fit has 28 free parameters, and the fit to the spectrum at the GRB position has 24 free parameters.