Assessing the sources of reionisation: a spectroscopic case study of a 30$\times$ lensed galaxy at $z \sim 5$ with Ly{\alpha}, CIV, MgII, and [NeIII]

We present a detailed spectroscopic analysis of a galaxy at $z \simeq 4.88$ that is, by chance, magnified $\sim 30 \times$ by gravitational lensing. Only three sources at $z \gtrsim 5$ are known with such high magnification. This particular source has been shown to exhibit widespread, high equivalent width CIV $\lambda$ 1549 {\AA} emission, implying it is a unique example of a metal-poor galaxy with a hard radiation field, likely representing the galaxy population responsible for cosmic reionisation. Using UV nebular line ratio diagnostics, VLT/X-shooter observations rule out strong AGN activity, indicating a stellar origin of the hard radiation field instead. We present a new detection of [NeIII] $\lambda$ 3870 {\AA} and use the [NeIII]/[OII] line ratio to constrain the ionisation parameter and gas-phase metallicity. Closely related to the commonly used [OIII]/[OII] ratio, our [NeIII]/[OII] measurement shows this source is similar to local"Green Pea"galaxies and Lyman-continuum leakers. It furthermore suggests this galaxy is more metal poor than expected from the Fundamental Metallicity Relation, possibly as a consequence of excess gas accretion diluting the metallicity. Finally, we present the highest redshift detection of MgII $\lambda$ 2796 {\AA}, observed at high equivalent width in emission, in contrast to more evolved systems predominantly exhibiting MgII absorption. Strong MgII emission has been observed in most $z \sim 0$ Lyman-continuum leakers known and has recently been proposed as an indirect tracer of escaping ionising radiation. In conclusion, this strongly lensed galaxy, observed just 300 Myr after reionisation ends, enables testing of observational diagnostics proposed to constrain the physical properties of distant galaxies in the $\mathit{JWST}$/ELT era.


INTRODUCTION
Space-based observatories such as Hubble Space Telescope (HST) and Spitzer and ground-based 8 m-class telescopes have transformed our view of galaxy evolution in the high-redshift Universe, identifying statistically substantial samples of distant galaxies in deep imaging surveys beyond > 4 (Madau & Dickinson 2014). At this epoch, covering the first ∼ 10% of the current age of the Universe, the physical properties of galaxies were likely to be very different to those today, with metal-poor stellar populations, low stellar masses, and hard radiation fields. These conditions are favourable to strong nebular emission, despite the weak stellar continuum (e.g. Stark 2016). Equally, this suggests the faint galaxy population in ★ E-mail: jnw30@cam.ac.uk the Epoch of Reionisation (EoR) can contribute significantly to reionisation (e.g. Bouwens et al. 2015).
This picture has mainly emerged from spectroscopic follow-up observations of individual distant sources selected in deep photometric surveys, although this poses several challenges. From the ground, near-infrared (NIR) spectrometers are restricted by Earth's atmosphere to observe key rest-frame optical emission line features, such as Hα, [O ] 5008 Å, and [O ] 3727, 3730 Å (simply [O ] hereafter) out to redshifts of about 2.5, 3.6, and 5.2, respectively. The much-anticipated James Webb Space Telescope (JWST) will explore the rest-frame optical spectra of more distant objects ( ∼ 4-12), which will enable the use of many emission line diagnostics that are carefully calibrated with the wealth of data for more nearby galaxies, like the optical classification schemes that distinguish spectra of star-forming galaxies shaped by nebular emission from H regions from those dominated by emission of the narrowline region of Active Galactic Nuclei (AGN; Baldwin, Phillips & Terlevich 1981, BPT hereafter;Veilleux & Osterbrock 1987).
Meanwhile, several new methods have been explored, which even as JWST is launched will prove valuable in the era of Extremely Large Telescopes (i.e. ELT, GMT, and TMT). For example, alternative classification schemes to the BPT classification have been proposed, targeting the rest-frame ultraviolet (UV) instead: these use highly ionised gas lines such as C ] 1907 Å, [C ] 1909 Å (C collectively), C 1548, 1551 Å (C ), and He 1640 Å (He ) to separate star-forming galaxies from AGN (e.g. Feltre et al. 2016). These lines are much brighter in the composite spectra of ∼ 3 Lyman-break galaxies than observed in the local Universe (e.g. Shapley et al. 2003). Another pressing challenge is to find a reliable method to uncover the sources responsible for reionisation by indirectly identifying Lyman-continuum (LyC) leakage in the EoR, where LyC and H Lyman-α (Lyα) becomes inaccessible due to absorption by the neutral IGM. Methods aimed at characterising EoR galaxies, such as the UV classification schemes and indirect proxies of LyC escape, can be tested at (slightly) lower redshift where features are readily observable with current instrumentation, ideally with analogues of high-redshift galaxies.
In this work, we present one such case study, investigating in detail the emission line properties of RCS0224z5, a strongly lensed galaxy at redshift 4.88 in the background of the RCS 0224-0002 cluster. RCS 0224-0002, a galaxy cluster at = 0.773, was discovered in the Red-Sequence Cluster Survey (RCS; Gladders et al. 2002). Several arc-like structures were found in this study, among which an arc consisting of four images of a gravitationally lensed background galaxy at 4.88, identified via its Lyα emission. The magnification of the four images ranges from = 1.30 to ∼ 140, making this only one of three known sources at 5 with a comparably high magnification (Franx et al. 1997;Swinbank et al. 2009;Khullar et al. 2021) -and placing this galaxy at less than 300 Myr after the end of reionisation. Follow-up observations with VLT/MUSE have furthermore revealed spatially widespread and narrow (FWHM 156 km/s) C emission with a high equivalent width (EW) of ∼ 10 Å in the rest frame (Smit et al. 2017), similar to what is being observed in an increasing number of ∼ 6-8 galaxies (Stark et al. 2015;Mainali et al. 2017;Laporte et al. 2017), but rarely seen in the local Universe (Berg et al. 2019a;Senchyna et al. 2019).
We present new VLT/X-shooter observations that constrain the rest-frame UV emission line diagnostics that are inaccessible within the MUSE wavelength range. Unlike sources at higher redshift, where no rest-frame optical features are accessible from the ground, Swinbank et al. (2007) presented widespread [O ] detected in deep SINFONI observations. We present the additional detection of [Ne ] 3870 Å emission and corresponding new measurement of the [Ne ]/[O ] line diagnostic to place this system in the context of the local galaxy population, in order to gain insight into the origin of high-EW C emission in the early Universe. Finally, we report the detection of Mg 2796 Å in emission: a remarkable finding, as this is in stark contrast with the local galaxy population, where it is mostly observed in absorption (e.g. Kinney et al. 1993). Being a resonant transition like Lyα, it has the potential to be an indirect tracer of LyC escape (e.g. Henry et al. 2018).
The outline of this paper is as follows. In Section 2, we describe the observations, and in Section 3 we present the results. In Section 4 we discuss the outcomes, and we finally summarise our findings in Section 5. In our analysis, we adopt the cosmological parameters Ω m = 0.3, Ω Λ = 0.7, and 0 = 70 km s −1 Mpc −1 throughout (implying an angular scale of 6.4 kpc/arcsec at = 4.88), to ease comparison with previous studies. All magnitudes are in the AB system (Oke & Gunn 1983).

X-shooter spectroscopy
Observations of the lensed image 1 of RCS0224z5, amplified by = 29 +9 −11 (luminosity-weighted; see Smit et al. 2017), were taken with the VLT/X-shooter (Vernet et al. 2011) on 11, 14, and 16 October 2018 with a total on-source time of 3.5 h, under ESO programme ID 0102.A-0704(A) (PI: Smit); the slit was centred at = 02:24:33.83, = −00:02:17.91 ( Figure 1) and using slit widths of 1.2 and 0.9 in the visible (VIS) and near infrared (NIR), resulting in a spectral resolution ≡ /Δ ≈ 6500 and ≈ 5600, respectively, in the two arms. Observations were taken with AB nodding with an offset of 3.8 and individual exposures were 383 s in the VIS and 230 s NIR arm. Observations were taken with an average airmass of 1.14 and seeing of 0.8 . Data reduction was performed using the standard X-shooter pipeline (Freudling et al. 2013). We apply the nodding-mode reduction, as well as stare-mode reduction with a manual algorithm to combine frames from the 'ABBA' nodding pattern, depending on which yields the best results; the manual stare-mode reduction is used throughout, except for the C line. Individual OBs were separately corrected for telluric absorption in the VIS and NIR arms using (Smette et al. 2015;Kausch et al. 2015).

SINFONI spectroscopy
Reduction of the SINFONI IFU spectroscopy is described in Swinbank et al. (2007). In short, IFU spectroscopy was performed for a total of 12 h on source with VLT/SINFONI (Eisenhauer et al. 2003;Bonnet et al. 2004) under ESO programme ID 075.B-0636(B). The data were taken in the HK grating, resulting in a spectral resolution of ≈ 1700, with a ∼ 8 × 8 arcsec 2 field of view (at a spatial sampling of 0.25 arcsec/pixel), covering the lensed images 2 and 3 of RCS0224z5 (luminosity-weighted amplifications of = 21 +12 −8 and = 138 +7 −74 , respectively; Smit et al. 2017). Lensed image 3 has a particularly high amplification (and corresponding uncertainty), as the arc crosses the lensing critical curve. We note that the source plane image of the galaxy is fully recovered by lensed image 1, but only partially in images 2 and 3: out of the two clumps seen in image 1, the one in north east is not reproduced in 2 and 3 (see Smit et al. 2017 for details).

HST imaging
HST imaging of RCS 0224-0002 is available on the Space Telescope Science Institute data archive 1 (GO 14497, PI: Smit; see Smit et al. 2017). Observations were performed with the Advanced Camera for Surveys (ACS) using the F814W ( 814 ) filter (2.2 ks exposure), and with the Wide Field Camera 3 (WFC3) using the F125W ( 125 ) and F160W ( 160 ) filters (both 2.6 ks exposures). The resulting images reach a depth of 26.3 mag, 26.8 mag, and 26.7 mag in the 814 , 125 , and 160 bands (5 for a 0.5 -diameter aperture). A false-colour image of these three bands is shown in the bottom left of Figure 1.   Ne ] in both X-shooter and SINFONI spectra. Bottom row: spectra of Lyα, C , and Mg emission lines observed with VLT/X-shooter. An arrow marks a tentative ∼ 3 redshifted component of C , see Section 3.1. In two-dimensional X-shooter spectra, the dark-light-dark signature of detected lines are highlighted with coloured ellipses (Section 2.1). Labels indicate the significance of each detection measured in a SNR-optimised aperture (larger for Lyα, smaller for C and Mg ), while all one-dimensional spectra shown are extracted from a larger aperture to capture the entire flux as reported in Table 1 (see Section 3.1 for details). The grey filled-in area shows the 1 uncertainty level. The rest-frame UV continuum fit is shown with a blue line. Velocities are based on the corresponding systemic redshift of [O ] (Section 3) and are centred on the brightest line for doublets.

RESULTS
In this study, we are mainly interested in line diagnostics using Lyα, C , He , the C doublet, Mg 2796, 2804 Å (Mg ), [O ], and [Ne ] 3870 Å ([Ne ]). 2 The measured velocity offsets, line fluxes, and rest-frame EWs (or upper limits) of these lines presented in Figure 1 are summarised in Table 1. In the following paragraphs, we will discuss the results for the X-shooter and SINFONI data sets individually. 2 In this work, we use vacuum wavelengths throughout (see Table 1); emission line labels reflect vacuum wavelengths, rounded to the nearest integer.
We derive the systemic redshift from the [O ] 3727, 3730 Å doublet in combination with the [Ne ] 3870 Å line for increased precision; for X-shooter, this is measured to be sys = 4.8737 ± 0.0010 (uncorrected for a negligible barycentric velocity of 5-7 km/s), while for SINFONI it is sys = 4.8754 ± 0.0003 (again not corrected for a barycentric velocity of up to 27 km/s or Δ = 0.0005, but consistent with [O ] = 4.8757 ± 0.0005 measured by Swinbank et al. 2007), leaving a difference of Δ = 0.0017. In both cases, we simultaneously fit the [O ] and [Ne ] lines while fixing the [O ] line ratio, due to limited spectral resolution and signal to noise. We adopt a ratio of 3730 / 3727 = 1.18, the median of ∼ 2.3 star-forming galaxies reported by Sanders et al. (2016), cor- respectively, using the intrinsic line widths obtained from the fit to the SINFONI spectrum. The ∼ 2 discrepancy between the systemic redshifts determined by X-shooter and SINFONI, equivalent to 88±52 km/s, may be a calibration problem (exceeding barycentric velocity corrections); or, given that the two spectra probe different images (see Figure 1), the velocity difference can be a consequence of real kinematic differences between the two components. In the following, we measure offsets from the systemic redshift using the consistent measurement in the same image, and by the same instrument. We include the uncertainty in determining the systemic redshift (i.e. 52 km/s for X-shooter) in the uncertainty on all velocity offsets. For all line flux measurements, we fit Gaussian profiles to the one-dimensional spectra. The uncertainty is estimated by scaling the flux uncertainty of a single spectral channel, Δ , by the square root of the number of spectral bins where line flux is detected (coloured channels in Figure 1).

X-shooter
The relevant X-shooter data are presented in the bottom row of Figure 1, which shows one-dimensional spectra extracted from a 2.4 aperture for all lines except Lyα, where we use a 3.2 aperture. These spectra are used to measure the velocity offsets and total fluxes ( Table 1). The annotated labels show the signal-to-noise ratio (SNR) measured in a smaller 1.4 aperture, again except for Lyα where the extended aperture yields a higher SNR. We detect strong Lyα emission (at ∼ 80 in a 3.2 aperture or ∼ 50 in a 1.4 aperture; in the 1.4 aperture, the Lyα EW decreases to 78 Å), as well as the C doublet, at 8.4 and 4.4 . Finally, we detect the Mg 2796 Å line at 5.2 (see Appendix A for more details on the significance of this detection). This makes RCS0224z5 the highest redshift galaxy for which Mg emission has been detected. After Lyα, the Mg 2796 Å line has the highest EW out of all emission features detected in the rest-frame UV, even though the other line of the doublet, Mg 2804 Å, is undetected due to skylines. We show the expected signal for Mg 2804 Å in Figure 1 assuming a typical flux ratio of 2796 / 2804 ≈ 1.9 between the Mg lines at 2796 Å and 2804 Å (e.g. Henry et al. 2018), which is indeed below the estimated uncertainty level.
The blue line in the C doublet, C 1551 Å, appears to have a weak second redshifted component (∼ 3 ), although the negative signature in the two-dimensional spectrum seems mostly absent, which is why we do not include it in our analysis. At the current sensitivity and spectral resolution, we cannot confidently explain the nature of this feature; however, note that if this emission feature is included in the C flux and EW, this would not affect our conclusions in Section 4.1 regarding the origin of highly ionised emission.
With X-shooter, we detect the [O ] doublet and [Ne ] at 2.2 and 1.8 by rebinning to 150 km/s and 75 km/s, respectively (both in a 1.4 aperture to maximise SNR). In our analysis, however, we will adopt the measurements of SINFONI at higher significance (see Section 3.2). Furthermore, as shown in Table 1, we obtain upper limits on emission from the He line and the C doublet. Since both lines of the C doublet fall directly on skylines, instead of a 2 limit from the noise as for He , we take the integrated flux measured within −100 km/s < < 100 km/s of the expected line centre of the 1907 Å line (which is slightly less affected by telluric absorption and skylines; see also Appendix A). We obtain an upper limit for the total flux of the doublet using the lowest physically attainable value of 1907 / 1909 ≈ 1.39 for ≤ 10 3 cm −3 (Kewley et al. 2019). If we take a ratio of ∼ 0.34 for ≤ 10 5 cm −3 , the resulting C /C ratio we measure shifts by 0.36 dex, leaving our findings unaffected (Section 4.1). The O ] 1661, 1666 Å doublet also remains undetected: the brightest line of the two, at 1666 Å, falls on a skyline, and the second line at 1661 Å is too faint to provide useful upper limits on the doublet.
By rebinning to a lower spectral resolution (in bins of Δ obs = 200 Å, masking skylines prior to rebinning), we detect the restframe UV continuum and assuming ∝ , we measure a UVcontinuum slope = −2.36 ± 0.28, in good agreement with = −2.19 ± 0.14 as measured from the HST 125 − 160 colour (Smit et al. 2017). This continuum fit is shown in all X-shooter spectra in Figure 1 with a blue line. Using this fit, we deduce the equivalent widths (or upper limits thereof) of observed lines.

In addition to the previously reported observation of the [O ] doublet with SINFONI ([O ]
; Swinbank et al. 2007), at 13.5 and 15.9 respectively, we present a new 4.8 detection of the [Ne ] line (see Figure 1), the highest redshift detection of this line to date. The [Ne ] feature is not confidently detected with X-shooter, likely due to the shorter exposure time (3.5 h versus 12 h).
Conversely, even though the SINFONI observations cover the wavelength of Mg , it was not detected due to the lower spectral resolution of SINFONI ( ≈ 1700 or Δ obs ≈ 10 Å at the observed wavelength of Mg , 16426 Å) blending the signal with the strong skyline feature at 16435 Å.

C : driven by star formation or AGN activity?
The high equivalent width emission of C observed in RCS0224z5 (∼ 20 Å) suggests the presence of a source producing ionising photons above the ionisation potential of C , 47.9 eV (e.g. Berg et al. 2019b), as well as a high production efficiency of LyC photons, ion (e.g. Stark et al. 2015). In determining the origin of such ionising radiation -star formation (SF) or AGN activity -comparisons between observations and predictions from photoionisation models (e.g. C , see Ferland et al. 2013; MAPPINGS, see Dopita et al. 2013) are now widely used (e.g. Kewley et al. 2001;Gutkin et al. 2016;Feltre et al. 2016;Maiolino & Mannucci 2019). Figure 2 examines the origin of the hard radiation field in RCS0224z5 with our constraints on the rest-frame UV line fluxes. The top panel of Figure 2 shows the C /C and C /He line ratios (a SF vs. AGN diagnostic proposed by Feltre et al. 2016). We place lower limits on both ratios using the C detection and upper limits on C and He . For comparison we show grids and lines for modelled nebular emission and narrow-line region AGN emission coloured according to their metallicity (see legend; assuming a solar metallicity of = 0.01524, Bressan et al. 2012). The SF models are from Gutkin et al. (2016), which are based on the latest version of the Bruzual & Charlot (2003) stellar population synthesis models, while the AGN models are drawn from Feltre et al. (2016). All models have a fixed hydrogen density ( H ; in this case 10 3 cm −3 for AGN and 10 2 cm −3 for SF models) and dust-to-heavy-element mass ratio (here, d = 0.3). The SF models are shown for different values of ionisation parameter , log 10 ∈ {−4, −3, −2, −1}, while the grids of narrow-line region AGN emission shown also have a varying (ranging from −2.0 to −1.2), the power-law index of the specific luminosity ∝ at rest-frame UV wavelengths, emit ≤ 2500 Å. We note that the results do not change significantly under different combinations of parameters H , d . The same is true for our assumption about the maximum electron density to establish the C doublet flux (see Section 3.1), as shown by the light grey measurement (reflecting a maximum of ≤ 10 5 cm −3 instead of 10 3 cm −3 ; see Section 3.1).
A confirmed LyC-emitting galaxy at 3.21, Ion2, is shown for comparison (de Barros et al. 2016;Vanzella et al. 2016Vanzella et al. , 2020; interestingly, its line ratios indicate a composite nature even though its spectral features in the UV have been attributed to young, massive stars (Vanzella et al. 2020). Also shown are two additional galaxies, at redshifts 6.11 (Stark et al. 2015) and 7.045  which are presumably similar to RCS0224z5, with low mass and a hard ionising radiation field found to be more likely originating from a metal-poor stellar population instead of an AGN. For these AGN models SF models SF models ; see text for details), a LyC-emitting galaxy at ∼ 3 (Vanzella et al. 2020), two galaxies at ∼ 6 and 7 shown to be star-forming (Stark et al. 2015;Mainali et al. 2017), and a ∼ 7 galaxy likely dominated by an AGN (Laporte et al. 2017). From these diagnostics, we conclude that there is no strong AGN activity present in RCS0224z5 and the emission is likely produced in star-forming H regions. Additionally, high-redshift galaxies exhibit C EWs that are markedly higher than in any local analogues.
galaxies, and for RCS0224z5, the 2 upper limits strongly reject all possibilities of pure AGN models. The photoionisation models by Gutkin et al. (2016) and Feltre et al. (2016) are coupled to cosmological simulations by Hirschmann et al. (2019) to design BPT-like UV diagnostics to differentiate star-forming galaxies from AGN. These diagnostics are specifically designed to provide an accurate classification over a wide range of redshifts (0 < 6). Their diagnostic mapping the EW of C against the C /He ratio is shown in the bottom panel of Figure 2. We compare our measurement with local star-forming galaxies with extreme emission lines, that can therefore be seen as analogues of high-redshift galaxies: a sample selected through He 4687 Å emission (implying a hard ionising spectrum; see Senchyna et al. 2017), and a sample of galaxies selected for high-EW [O ] 5008 Å emission (among other criteria; Berg et al. 2019a). We show the high-redshift star-forming galaxies and mentioned above and, in contrast, a = 7.149 galaxy showing evidence for AGN activity (Laporte et al. 2017). The constraints on these high-redshift galaxies are in agreement with respectively the star formation and AGN models. However, there is a noticeable difference in their line ratios relative to the combined sample of low-redshift 'analogues'.
From these diagnostics, we conclude that there is no strong AGN activity present in RCS0224z5 and the emission is likely produced in H regions. This finding agrees with Smit et al. (2017), who concluded that the C emission is likely nebular in origin, based on the 'clumpy' C morphology (as opposed to centrally concentrated emission). Instead, a young (1-3 Myr), metal-poor stellar population likely has to account for the hard radiation field required for the C emission, providing a considerable contribution of photons reaching energies of at least 47.9 eV. This fits into the picture of the prevalence of extreme line emitters in the early Universe -both more common and more extreme than any known local analogues -and accompanying hard radiation fields that has emerged recently (e.g. Smit et al. 2014Smit et al. , 2015Stark et al. 2015;Mainali et al. 2017;Hutchison et al. 2019).

The [Ne ]/[O ] line ratio as an ionisation and metallicity diagnostic alternative to [O ]/[O ]
Neon is an α element, produced by heavy stars ( 8 M ) in their carbon burning cycle and ultimately type II supernovae, and therefore tightly matches oxygen in abundance (Maiolino & Mannucci 2019, and references therein  (Levesque & Richardson 2014). The former has long been exploited (e.g. Hicks et al. 2002), and indeed, [Ne ] has been detected several times at 3, in combination with [O ]: in particular, we will consider here the galaxies Ion2 at 3.21, a confirmed LyC-emitting galaxy (as discussed in Section 4.1; de Barros et al. 2016;Vanzella et al. 2016Vanzella et al. , 2020   ratio. Star-forming galaxies at ∼ 0 have a ratio of ∼ 0.01 (with little scatter), whereas the ratio is significantly increased at higher redshift, ∼ 0.1 at ∼ 2-3. The trend culminates at ∼ 5: the ratio of RCS0224z5 (∼ 0.6), seemingly typical based on this trend, is comparable to that of local LyC leakers, which are clear outliers compared to the general ∼ 0 galaxy population.

[Ne ]/[O ] evolution over stellar mass and cosmic time
The emission line ratio [Ne ]/[O ] = 0.46±0.10 for RCS0224z5 is shown as a function of stellar mass in Figure 3. To find the stellar mass for images 2 and 3 independent of magnification uncertainties, we follow the derivation of Swinbank et al. (2007), who reported a dynamical mass estimate of dyn ∼ 10 10 M based on the [O ] velocity dispersion (via Equation (1) in Erb et al. 2006). We assume a fiducial = 3 ± 2 (with high uncertainty to reflect the range of possible values depending on mass distribution and velocity field, see Erb et al. 2006), and our measured [O ] line width of [O ] = 151 ± 30 km/s within = 2 kpc (following Swinbank et al. 2007). We then take the typical stellar mass fraction of ∼ 1-2 star-forming galaxies of 27 ± 5%, reflecting the range 22-32% reported by Stott et al. (2016; see also Wuyts et al. 2016), to derive a stellar mass of (9 ± 7) × 10 9 M . We note that with HST photometry of image 1 (high magnification uncertainties prevent us from using the incomplete images 2 and 3), we derive a stellar mass of 4 +14 −3 × 10 8 M , using the FAST code (Kriek et al. 2009), assuming a constant star formation rate (SFR), a Chabrier (2003) IMF, a minimum age of 10 7 yr (the maximum age equal to the age of the universe at = 4.88), an SMC dust law, the Bruzual & Charlot (2003) stellar libraries, and a metallicity of = 0.2 Z . This estimate is marginally lower, but consistent within the uncertainty of the stellar mass obtained from the dynamical mass estimate.
Furthermore, the SFR [O ] of 12 ± 2 M yr −1 measured for image 2 and 3 by Swinbank et al. (2007) -combined with the stellar mass estimated from the dynamical mass -places RCS0224z5 just under on the main sequence at its redshift (e.g. Salmon et al. 2015; a lower stellar mass, as suggested by the SED modelling, would shift it onto the main sequence). This supports the hypothesis that RCS0224z5 is a typical ∼ 5 star-forming galaxy.
To put our measurements of the near-UV [Ne ] and [O ] lines into perspective, we turn to a large observational sample of nearby galaxies from the Sloan Digital Sky Survey Data Release 7 (SDSS DR7; Abazajian et al. 2009), retrieving line fluxes from the MPA-JHU emission line catalogue for 827,640 unique sources. 3 A detailed description of the selection procedure for the galaxies used here is given in Appendix B. The [Ne ]/[O ] ratio of these nearby galaxies are shown in bins of stellar mass (for bins with at least 25 galaxies), for the two main classes (star-forming and Seyfert; see Appendix B). Additionally, we compare these to local LyC-leaking galaxies; in particular, we will consider a sample compiled from Izotov et al. (2016aIzotov et al. ( ,b, 2018a; Gazagnes et al. (2020); Guseva et al. (2020) ratios theoretically; however, their quantitative predictions did not quite match observations, which is thought to be due to the modelled ionising spectra being insufficiently hard (Levesque & Richardson 2014). We therefore construct an empirical relationship here by exploiting the statistics of SDSS. In Figure 4, (1) and (2) In the case of RCS0224z5, we find an ionisation parameter of log 10 = −2.37 ± 0.08. Given its derivation from the [Ne ]/[O ] ratio, we again note this is likely not an extreme case at its redshift ( Figure 3, and see similar estimates of at ∼ 7-8 in Stark et al. 2017), but a high ionisation parameter compared to local galaxies, similar to that of LyC-leaking systems (

Tracing metallicity with [Ne ]/[O ]
By virtue of its correlation with the ionisation parameter, the [Ne ]/[O ] ratio is also an indirect tracer of the metallicity. In the following we discuss the former aspect in greater detail, albeit with the caveat that the ratio is a more robust diagnostic for the ionisation parameter than for metallicity. By using the metallicity diagnostic relation for [Ne ]/[O ] from Bian et al. (2018), calibrated with local analogues of highredshift galaxies, we obtain 12 + log (O/H) = 8.01 +0.21 −0.21 for RCS0224z5, where we have included a 0.2 dex systematic calibration uncertainty (see e.g. Nagao et al. 2006). This corresponds to roughly 20% of the solar metallicity: = 0.21 +0.13 −0.08 Z . 4 The galaxies at ∼ 4-5 with [Ne ] and [O ] measurements are clearly characterised by significantly higher line ratios (Figure 3), and hence higher ionisation parameters than ∼ 3.5 galaxies. Using the (uncertain) strong-line calibration, we can indirectly infer they have lower metallicities too, which would confirm that they do follow the general redshift evolution of metallicity.
However, one should take into account that the metallicity of star-forming galaxies also shows a secondary dependence on SFR that, together with the primary dependence on mass, is dubbed Fundamental Metallicity Relation (FMR, see e.g. Mannucci et al. 2010; see also a review in Maiolino & Mannucci 2019). This secondary dependence is thought to result from a more fundamental relation with the gas content (Bothwell et al. 2013(Bothwell et al. , 2016a and ascribed primarily to the accretion of near-pristine (or low-metallicity) gas which increases the gas content and dilutes the metallicity; the increased 4 We adopt a solar oxygen abundance of 12 + log (O/H) = 8.69 (Asplund et al. 2009). . Offsets from the Fundamental Metallicity Relation (FMR), given by the inferred metallicity minus the one derived from the FMR. Intrinsic uncertainty of the FMR (which varies with both stellar mass and SFR) is indicated by the grey shaded regions, the darker region typical for galaxies at high mass and low SFR, the lighter region for galaxies at low mass and high SFR (for details, see Curti et al. 2020). At low redshift, the LyC leakers from the Izotov et al. sample are shown. Samples binned by stellar mass at = 2.3 and = 3.3 from the MOSDEF survey (Sanders et al. 2021) are shown, as well as a binned sample of 31 galaxies at ∼ 3-4 from the AMAZE and LSD surveys, presented in Troncoso et al. (2014). LnA1689-2 is excluded from the latter and instead shown individually at 4.87, as are Ion2 at 3.21 (Vanzella et al. 2020), SMACS J2031.8-4036 at 3.51 (Christensen et al. 2012a), GOODSN-17940 at 4.41 (Shapley et al. 2017). Galaxies at the highest redshift seem to show a trend towards negative differences, i.e. metallicities smaller than expected from the FMR. gas content also results into an increased SFR through the Kennicutt-Schmidt relation, which gives the observed anti-correlation between SFR and metallicity. Once this secondary dependence is taken into account then the redshift evolution of the metallicity is essentially absent, at least out to ∼ 2.5 (Mannucci et al. 2010;Cresci et al. 2019). Some deviation from the FMR was claimed at > 3 (Troncoso et al. 2014), but more recently Sanders et al. (2021) have shown that their sample at z∼3 follows the same FMR as local galaxies if metallicities are measured through the Bian et al. (2018) calibration.
We assess whether RCS0224z5 and other high-redshift galaxies, as well as the local LyC leakers from the Izotov et al. sample, follow the FMR, carefully revisiting all measurements in a consistent way, as discussed in the following. At high redshift, we consider galaxies at > 2 from Sanders et al. (2021) and Troncoso et al. (2014), as well as the three galaxies at > 4 with detections of [Ne ] and [O ] already discussed in the previous section. For RCS0224z5 we use the stellar mass of images 2 and 3 obtained from the dynamical mass, (9 ± 7) × 10 9 M (including uncertainties on , the stellar mass fraction, and [O ] , discussed in Section 4.2.1), and the SFR of images 2 and 3, 12 ± 2 M yr −1 , as reported by Swinbank et al. (2007). We also include the two individual galaxies at ∼ 3 with [Ne ] and [O ] measurements discussed in the previous section. We use the same high-redshift calibration from Bian et al. (2018) for all high-redshift galaxies. We then consider Δ FMR (12 + log(O/H)), the deviation of the measured metallicity from the local FMR, defined as Here, we describe the metallicity predicted by the local FMR, (12 + log(O/H)) FMR , as a function of stellar mass and SFR through Equation (5) in Curti et al. (2020). The best-fit parameters obtained by Curti et al. adopt -based metallicity calibrations (as Bian et al. 2018, but based on the full SDSS dataset). Uncertainties are estimated by independently varying the input variables ( * , SFR) within the 1 uncertainty range and adding the resulting deviations in quadrature. For LyC leakers in the Izotov et al. sample, we calculate the FMR offset if the metallicity has been reported. We show the resulting deviations from the FMR in Figure 5.
While at ∼ 2 galaxies are fully consistent with the local FMR, at > 3 galaxies start having a larger scatter and tend to be distributed towards lower metallicities with respect to the FMR, also depending on the sample. Although the uncertainties are large, RCS0224z5 also shows some mild tension with respect to the local FMR, being more metal poor. Interestingly, the nearby LyC-leaking galaxies exhibit a significant offset in a similar direction. The other galaxy at nearly the same redshift, LnA1689-2 from the Troncoso et al. sample, likewise deviates from the FMR. Since the FMR is considered a relation describing the smooth evolution of galaxies in near-equilibrium between the inflow and outflow of gas and star formation, these findings may suggest that such young galaxies at ∼ 5 are in an early stage of evolution in which they have not yet reached a steady equilibrium as the more evolved galaxies at lower redshifts, possibly as a consequence of an excess in gas accretion, which results in additional dilution of metals. However, these results should be confirmed with a larger sample of galaxies at > 4 and by using additional metallicity diagnostics, which will certainly be feasible with JWST.
Finally, we note that the estimated metallicity obtained through the [Ne ]/[O ] ratio is significantly higher than the values required in stellar population synthesis models to reproduce the observed C EW ( < 0.05 Z , as shown in Smit et al. 2017). This indicates the hardness of the ionising spectrum may currently be underestimated in such models. The lack of ionising photons above 47.9 eV could be accounted for by physics currently not captured in models (e.g. stars stripped in binaries, Götberg et al. 2019), or it may be explained by a lower stellar iron abundance than derived using the nebular oxygen abundance and assuming solar oxygen-to-iron ratios (O/Fe). A higher oxygen-to-iron is expected in the early Universe compared to local galaxies, given that AGB stars have lifetimes of only a few gigayears and metal enrichment is dominated by supernovae (Maiolino & Mannucci 2019). In particular, the discrepancy seems to agree well with the findings of Steidel et al. (2016), who demonstrate that the oxygen-to-iron ratio of their sample of starforming galaxies at ∼ 2.4 is elevated by a factor of ∼ 4 relative to the solar value (i.e. virtually the same enhancement as the ratio between the metallicities discussed here, 20% and 5% solar). While RCS0224z5 appears moderately metal-enriched as measured indirectly with [Ne ]/[O ] (probing the nebular oxygen abundance), stellar atmospheres could be significantly more iron-poor than expected when assuming a solar O/Fe ratio, resulting in an ionising spectrum sufficiently hard to explain the observed C EW.
More generally, these results show the potential of [Ne ] as a powerful diagnostic, specifically for the study of high-redshift galaxies. Note, however, that the [Ne ] line can blend with He 3890 Å, separated by ∼ 1500 km/s, in low-resolution spectra ( 200). This effect becomes more prominent when the lines are broadened, for example with a significant contribution from the broad-line region of an AGN (e.g. Malkan et al. 2017) -this will not be the case, however, for star-forming systems dominated by narrow nebular emission lines.

Velocity offsets of Lyα and Mg
Using spatially resolved MUSE spectroscopy, Smit et al. (2017) demonstrated the presence of extended, high-EW Lyα emission, with a narrow, red peak emerging very close to the systemic redshift (defined by [O ]), regardless of position within the Lyα halo. Xshooter has a higher spectral resolution than MUSE at ∼ 7000 Å ( ∼ 6500 versus ∼ 2700, respectively). We fit an asymmetric Gaussian line profile (see e.g. Shibuya et al. 2014) to the Lyα observed in image 1 by X-shooter (see Figure 1). We find a velocity offset of Δ peak = 156 ± 52 km/s from the systemic redshift (in agreement with Smit et al. 2017), FWHM of 207 ± 6 km/s, and asymmetry factor asym = 0.32 ± 0.01, indicating a skewed profile with a red wing. The asymmetric Gaussian provides an overall good fit, but does show non-vanishing residuals, particularly at the line peak, as well as the regions around 400 and 1000 km/s. As we lack sufficient angular resolution in the spectrum to study the Lyα line shape in depth, we will not focus on possible interpretations here and instead refer to the extensive discussion in Smit et al. (2017).
The determination of the peak offset can provide interesting constraints on properties of the neutral ISM. In particular, the peak separation in a double-peaked Lyα profile (peak offset being the closest alternative to peak separation in the absence of a blue peak 5 in the observed spectrum as a result of absorption in the intervening neutral IGM) is an indicator of resonant scattering of escaping Lyα photons: a higher column density of neutral hydrogen along the path 2796 Å (bottom) compared to the corresponding velocity offsets of Lyα (its red peak; top) and the peak of Mg 2796 Å (bottom), compared to local extreme emission line galaxies. Among these are ten LyC-emitting sources (the Izotov et al. sample and Henry et al. 2018, coloured according to the escape fraction of LyC, if known). In the top panel, a sample of Green Pea galaxies from Yang et al. (2016Yang et al. ( , 2017 is shown (the sample consists of 43 galaxies, among which 5 are already contained in the Izotov et al. sample), with a simple power-law fit. Both panels show a similar trend (though with considerable scatter), where a small velocity offset indicates a large escape fraction. The measured velocity offsets of RCS0224z5 (effectively an upper limit in the case of Lyα due to IGM absorption) again suggest relatively high escape fractions, which is supported by the predicted escape fraction of Mg 2796 Å (the horizontal dashed line; see text for details).
of escape means more scattering, affecting the line profile shape to have its peak appear increasingly further from the systemic velocity at which the photons were produced: only photons far away from resonance (in frequency space), with a resulting low cross section, are able to escape (e.g. Verhamme et al. 2017). In the context of the escape of LyC, which is itself governed by the same distribution of neutral hydrogen, the peak separation has proven to be a solid predictor of LyC escape fractions (Verhamme et al. 2017;Izotov et al. 2018b;Gazagnes et al. 2020). There are other indirect probes of LyC escape, though, which become necessary for application in the EoR, where Lyα (including the red peak) can be fully absorbed, as a result of the broad damping wing (e.g. Dĳkstra 2014). Within this context, Mg , also a resonant transition in the near UV, presents promising features for high-redshift studies.
We detect Mg 2796 Å as a narrow emission line close to the systemic redshift (∼ 52 km/s, see Figure 1 and Table 1), while this feature is commonly seen in absorption in the spectra of local galaxies. Mg P-Cygni profiles with blueshifted absorption and redshifted emission have been discovered in more distant ( 0.5) galaxies, however, where it has been exploited to study galactic outflows (e.g. Weiner et al. 2009;Rubin et al. 2010Rubin et al. , 2011Giavalisco et al. 2011;Erb et al. 2012;Kornei et al. 2013;Bordoloi et al. 2016;Finley et al. 2017). Previous studies of gravitationally lensed galaxies at ∼ 1.5-2 have also demonstrated several cases of Mg emission, seen without P-Cygni profiles or evidence for a redshift from the systemic velocity (Pettini et al. 2010;Rigby et al. 2014;Karman et al. 2016).
Nebular emission from H regions or resonant scattering (of either Mg or continuum photons) are both plausible sources of Mg emission. The former scenario is supported by comparing observed Mg profiles to photoionisation models, while their variety, ranging from narrow, systemic emission to P-Cygni and pure absorption, provides evidence for the latter (Rubin et al. 2010;Erb et al. 2012;Feltre et al. 2018). For RCS0224z5, its narrow line profile observed close to the systemic redshift suggests a nebular origin of the Mg line and an ISM where little scattering takes place along the line of sight (e.g. due to a very high filling factor of ionised gas).

The predictive power of Lyα and Mg emission for unseen LyC escape processes
Considering the resonant nature of Mg (and the low ionisation energies of magnesium that make Mg mainly a tracer of the neutral ISM), various studies have pointed out the resemblance to Lyα (e.g. Henry et al. 2018;Feltre et al. 2018). As a result, Mg might provide a new way to indirectly but effectively identify sources emitting both Lyα (commonly used as a probe for measuring the conditions of the IGM, see Dĳkstra 2014) and LyC radiation at 6, before reionisation is completed (McGreer et al. 2015), where neither may be directly observable as a result of absorption by the neutral IGM. Indeed, Mg emission has been reported in ten local LyC leakers (Izotov et al. 2016a(Izotov et al. ,b, 2018aGuseva et al. 2020), and in a sample of Green Pea (GP, see also Section 4.2.2) galaxies (Henry et al. 2018). In the latter, a correlation between the escape fractions of Mg and Lyα has been found, which suggests a tentative correlation between the escape fractions of Mg and LyC. If well established (promising first results have been reported, Chisholm et al. 2020;Matthee et al. 2021), this correlation could allow JWST and the generation of Extremely Large Telescopes to reveal the sources beyond (and behind) reionisation, given they can detect a Mg signal from sources in the EoR. Moreover, Mg would provide a tool to predict the intrinsic properties of Lyα within galaxies, in order to improve the constraints on the neutral fraction in the IGM derived from the Lyα prevalence in reionisation-era sources (e.g. Schenker et al. 2014;Mason et al. 2018;Pentericci et al. 2018).
Using the measured EW of Mg 2796 Å we compare RCS0224z5 to local LyC leakers and GPs from the Izotov et al. and Henry et al. samples in Figure 6. This figure illustrates the correlation between Lyα and Mg EWs (although lacking an evident direct relation with LyC escape fraction shown by the colourbar), as would be expected for correlated escape fractions of the two lines.
As discussed in Section 4.3.1, the velocity offsets of a resonant emission line can be a proxy for the fraction of escaping photons (i.e. both Lyα and Mg ). Figure 7 therefore compares escape fractions with velocity offsets, respectively Lyα escape as a function of the velocity offset of its red peak, and Mg 2796 Å escape as a function of peak velocity offset of that same line. In the case of Lyα, an additional sample of Green Pea galaxies from Yang et al. (2016Yang et al. ( , 2017 is shown for reference (the sample consists of 43 galaxies, among which 5 are already contained in the Izotov et al. sample). The data points show a significant amount of scatter, but the velocity offsets are negatively correlated with the escape fractions. We fit a simple power-law of the form log 10 esc, Lyα = Δ red peak, Lyα + specifically, the Lyα velocity offset would result in a corresponding escape fraction of esc, Lyα = 0.17 +0.11 −0.07 . Since absorption by the intervening IGM could bias the Lyα peak offset redwards, we note its measured velocity offset (and hence the implied Lyα escape fraction) should be considered as an upper (lower) limit. Similarly, the measured velocity offset of Mg implies a relatively high escape fraction. Even though the offset from the systemic redshift measured with X-shooter is somewhat uncertain (see Section 3), Mg is ∼ 100 km/s bluewards of Lyα, and ∼ 40 km/s bluewards of C (all measured on the same X-shooter spectrum), which suggests very little scattering (resulting in P-Cygni profiles) can have taken place, indicating that both Lyα and Mg escape easily.
Independently, we can estimate the Mg 2796 Å escape fraction. Henry et al. (2018) (1) and (3) in Henry et al. (2018). The final line follows from inserting Equation (1) in this work. For RCS0224z5, we find 2796 = −1.34 ± 0.22, taking into account a ∼ 0.2 dex scatter in Equation (5) (see Henry et al. 2018), which translates to a predicted intrinsic Mg 2796 Å flux of (5.0 ± 1.5) · 10 −18 erg s −1 cm −2 . The predicted escape fraction is then esc, Mg 2796 Å = 0.13 ± 0.08, as indicated by the horizontal dashed line in Figure 7. We furthermore note 2796 can also be translated to the ratio of Finally, we will briefly discuss the feasibility of observing Mg in EoR sources. Simulations 6 of the near-infrared spectrograph on JWST (NIRSpec), point out that for an (intrinsically) relatively faint object like RCS0224z5, whose UV continuum would be observed as UV ∼ 27.4 mag at = 7, detecting Mg spectroscopically would be challenging (see Appendix C for a detailed description). Lowresolution ( ∼ 100) JWST/NIRSpec observations will not resolve the doublet or provide velocity offset information. Only a very deep 6 JWST Exposure Time Calculator: https://jwst.etc.stsci.edu.
(∼ 10 h) exposure with JWST/NIRSpec at medium spectral resolution would likely yield a significant detection at sufficient spectral resolution to resolve the doublet for typical ∼ 7 EoR galaxies, unless the observed Mg flux is substantially enhanced (either intrinsically, e.g. by a luminous star-bursting galaxy, or externally by gravitational lensing). In addition, spectroscopic observations of Mg could be performed with Extremely Large Telescopes out to redshift 7 in the -band, in order to unlock the potential of Mg not only for spectroscopic redshift confirmation, but also as an indirect tracer of Lyα and LyC properties of galaxies in the EoR.

SUMMARY
We have presented new X-shooter and SINFONI observations of a 30× magnified galaxy at 4.88, RCS0224z5. Only three sources at 5 are known with this lensing magnification, and at the same time its redshift places RCS0224z5 just below the observational limit for accessing the bluest rest-frame optical emission lines from the ground ([O ] and [Ne ], other lines have already shifted into the mid-infrared). This particular source has been shown to exhibit widespread, high equivalent width C 1549 Å emission, suggesting it is a unique example of a metal-poor galaxy, with a hard radiation field and high LyC production efficiency ion , likely representing the galaxy population that is responsible for cosmic reionisation. By virtue of its lensing magnification and redshift, RCS0224z5 is thus a unique "Rosetta Stone" object that could help bridge the gap in our understanding between galaxies in the local and very early Universe. We summarise our findings as follows: • We rule out the presence of strong AGN activity in the source, based on UV BPT-like diagnostics. Instead, a young (1-3 Myr), metal-poor stellar population is likely responsible for the hard radiation field required for the C emission, providing a considerable contribution of photons reaching energies of at least 47.9 eV.  [Ne ] is detected shows a similar displacement in metallicity, as do nearby LyC leakers. Since the FMR is considered a relation describing the smooth chemical evolution of galaxies, in which galaxies are in near-equilibrium between star formation and gas inflow and outflow, the deviation of these two galaxies at ∼ 5 suggests that primeval galaxies (and rare, LyC-leaking galaxies in the local Universe) might be out of equilibrium by being subject to an excess of gas accretion, resulting in an excess of metallicity dilution. However, more measurements at this cosmic epoch are certainly needed to verify this trend.
• Our detection of Mg in emission, the highest EW emission line observed in this source after Lyα (and the highest redshift detection to date), demonstrates its potential for several applications. Firstly, it can simply act as a spectroscopic redshift confirmation at high redshift -especially in the EoR (at 6), where Lyα will be absorbed by the neutral IGM. Secondly, since the escape of Mg correlates with that of Lyα (Henry et al. 2018), it might provide a new way to indirectly but effectively identify leaking LyC radiation in the same sources during an epoch when the Universe is opaque also to LyC photons. Finally, detecting Mg in these sources would provide a tool to predict the intrinsic properties of Lyα within galaxies, allowing improved constraints on the neutral fraction in the IGM derived from the Lyα prevalence.

DATA AVAILABILITY
The X-shooter and SINFONI data underlying this article are available in the ESO archive at https://archive.eso.org/ under ESO programme IDs 0102.A-0704(A) and 075.B-0636(B), respectively. The HST data underlying this article are available in the MAST archive at 10.17909/T9-9KG5-HG27. The reduced data underlying this article will be shared on reasonable request to the corresponding author.

APPENDIX A: Mg AND C SIGNIFICANCE
In this appendix, we elaborate on the significance of the (non-)detections of the Mg emission line and the C ] 1907 Å, [C ] 1909 Å doublet. In Figure A1, X-shooter spectra of Mg are shown for each of the three observation blocks (OBs) individually (first three columns) and the combined result for a smaller and extended aperture (final two columns). The measured velocity offset and flux for each different configuration are summarised in Table A1.
Furthermore, Figure A2 shows the portion of the spectrum where the C doublet would be expected, both without and with telluric absorption correction (TAC; see Section 2.1). It is unclear whether a signal is present in the spectra, which lack a clear dark-light-dark pattern (cf. Figure 1), in part because of skyline contamination and partly owing to the strong telluric absorption. We have chosen not to attempt to measure an upper limit for the [C ] 1909 Å line directly, as it falls precisely on a region that is heavily impacted by skylines and telluric absorption. Instead, we assume a line ratio (see Section 3.1). . X-shooter spectra of Mg for each of the three OBs individually (first three columns) and the combined spectra for a smaller and extended aperture (final two columns). One-dimensional spectra for the individual OBs have been extracted from the same smaller aperture as in the fourth column. -500 0 500 v (km/s) -500 0 500 v (km/s) Figure A2. X-shooter spectra in the wavelength region where the C doublet would be expected, both without and with TAC (see Section 2.1). The top row shows the resulting atmospheric transmission calculated by -. A region within −200 km/s < < 200 km/s of the expected 1907 Å line centre, which has been used to place an upper limit on the flux, is highlighted in the bottom row of one-dimensional spectra.

APPENDIX B: SDSS SELECTION
For the comparison sample drawn from the SDSS DR7 (discussed in Section 4.2), we outline the selection criteria here in detail. Following previous studies (e.g. Kewley et al. 2006;Juneau et al. 2014;Feltre et al. 2016), we select galaxies satisfying the following criteria: Furthermore, we only select galaxies with SNR > 30 on the [O ] doublet -see the discussion in Section 4.2. (iii) In order to align with previous studies, redshifts between 0.04 < < 0.2. These lower and upper limits are imposed to avoid strong fiber-aperture effects, and to cover detections of intrinsically weak lines while maintaining a good completeness for Seyfert-type galaxies, respectively (e.g. Juneau et al. 2014). (iv) A valid stellar mass measurement (17 entries have * = −1).
This leads to a final sample of 8960 galaxies. We classify the galaxies into star-forming, composite, Seyfert, and LINER classes (although we will focus only on star-forming and Seyfert types), based on the [N ], [S ], and [O ] BPT diagrams, following Kewley et al. (2006). Subsequently, the line fluxes are corrected for dust extinction using the Cardelli et al. (1989) reddening curve assuming = / ( − ) = 3.1, and a fiducial intrinsic Hα/Hβ ratio of 2.85 for star-forming galaxies, and 3.1 for AGN-dominated systems (for case-B recombination at = 10 4 K and ∼ 10 2 -10 4 cm −3 , see Kewley et al. 2006). In this sample, 2484 galaxies or 27.7% have a SNR > 5 [Ne ] detection.

APPENDIX C: JWST ETC CALCULATION
Given the observed Mg 2796 Å flux of 5.0 · 10 −18 erg s −1 cm −2 (see Table 1) and assuming a typical flux ratio of 2796 / 2804 ≈ 1.9 between the Mg lines at 2796 Å and 2804 Å (e.g. Henry et al. 2018), the total flux of the doublet would become 7.6 · 10 −18 erg s −1 cm −2 . However, taking into account the lensing magnification of = 29, we derive an intrinsic flux of 2.6 · 10 −19 erg s −1 cm −2 at = 4.88. We note that the uncertainty and spatial variation of the lensing magnification makes this only a rough estimate of the true intrinsic flux. Assuming an object with the same luminosity at = 7 (in which case Mg would be observed at obs = 2.24 µm), this would lead to an observed flux