The majority of long-duration (>2s) gamma-ray bursts (GRBs) are believed to arise from the collapse of massive stars (Hjorth et al. 2003) with a small proportion created from the merger of compact objects (Rastinejad et al. 2022, Yang et al. 2022, Troja et al. 2022). Most of these systems are likely formed via standard stellar evolution pathways. However, it has long been thought that a fraction of GRBs may instead be an outcome of dynamical interactions in dense environments (Grindlay et al. 2006, Fragione et al. 2019, McKernan et al. 2020), channels which could also contribute significantly to the samples of compact object mergers detected as gravitational wave sources (O’Leary et al. 2016). Here we report the case of GRB 191019A, a long GRB (T_90 = 64.4 +/- 4.5 s) which we pinpoint close (< 100 pc projected) to the nucleus of an ancient (>1 Gyr old) host galaxy at z=0.248. The lack of evidence for star formation and deep limits on any supernova emission makes a massive star origin difficult to reconcile with observations, while the timescales of the emission rule out direct interaction with the supermassive black hole in the nucleus of the galaxy, We suggest that the most likely route for progenitor formation is via dynamical interactions in the dense nucleus of the host, consistent with the centres of such galaxies exhibiting interaction rates up to two orders of magnitude larger than typical field galaxies (French et al. 2014, Stone et al. 2016). The burst properties could naturally be explained via compact object mergers involving white dwarfs (WD), neutron stars (NS), or black holes (BH). These may form dynamically in dense stellar clusters, or originate in a gaseous disc around the supermassive black hole (Perna et al. 2021, Lazzati et al. 2022). Future electromagnetic and gravitational-wave observations in tandem thus offer a route to probe the dynamical fraction and the details of dynamical interactions in galactic nuclei and other high-density stellar systems.