We report the observation of a coalescing compact binary with component masses 2.5–4.5 M⊙ and 1.2–2.0 M⊙ (all measurements quoted at the 90% credible level). The gravitational-wave signal GW230529_181500 was observed during the fourth observing run of the LIGO–Virgo–KAGRA detector network on 2023 May 29 by the LIGO Livingston observatory. The primary component of the source has a mass less than 5 M⊙ at 99% credibility. We cannot definitively determine from gravitational-wave data alone whether either component of the source is a neutron star or a black hole. However, given existing estimates of the maximum neutron star mass, we find the most probable interpretation of the source to be the coalescence of a neutron star with a black hole that has a mass between the most massive neutron stars and the least massive black holes observed in the Galaxy. We provisionally estimate a merger rate density of 55^{+127}_{-47} Gpc^{-3} yr^{-1} for compact binary coalescences with properties similar to the source of GW230529_181500; assuming that the source is a neutron star–black hole merger, GW230529_181500-like sources may make up the majority of neutron star–black hole coalescences. The discovery of this system implies an increase in the expected rate of neutron star–black hole mergers with electromagnetic counterparts and provides further evidence for compact objects existing within the purported lower mass gap.