Fast radio bursts (FRBs) are exceptionally luminous flashes of unknown physical origin, reaching us from other galaxies (Petroff et al. 2019). Most FRBs have only ever been seen once, while others flash repeatedly, though sporadically (Spitler et al. 2016, CHIME/FRB Collaboration et al. 2021). Many models invoke magnetically powered neutron stars (magnetars) as the engines producing FRB emission (Margalit & Metzger 2018, CHIME/FRB Collaboration et al. 2020). Recently, CHIME/FRB announced the discovery (Bhardwaj et al. 2021) of the repeating FRB 20200120E, coming from the direction of the nearby grand design spiral galaxy M81. Four potential counterparts at other observing wavelengths were identified (Bhardwaj et al. 2021) but no definitive association with these sources, or M81, could be made. Here we report an extremely precise localisation of FRB 20200120E, which allows us to associate it with a globular cluster (GC) in the M81 galactic system and to place it ~2pc offset from the optical center of light of the GC. This confirms (Bhardwaj et al. 2021) that FRB 20200120E is 40 times closer than any other known extragalactic FRB. Because such GCs host old stellar populations, this association strongly challenges FRB models that invoke young magnetars formed in a core-collapse supernova as powering FRB emission. We propose, instead, that FRB 20200120E is a highly magnetised neutron star formed via either accretion-induced collapse of a white dwarf or via merger of compact stars in a binary system (Margalit et al. 2019). Alternative scenarios involving compact binary systems, efficiently formed inside globular clusters, could also be responsible for the observed bursts.