A search for the associated production of a heavy resonance with a top-quark or a top-antitop-quark pair, and decaying into a $$t{\bar{t}}$$ t t ¯ pair is presented. The search uses the data recorded by the ATLAS detector in pp collisions at $$\sqrt{s}= 13$$ s = 13 $$\text {TeV}$$ TeV at the Large Hadron Collider during the years 2015–2018, corresponding to an integrated luminosity of 139 $$\text {fb}^{-1}$$ fb - 1 . Events containing exactly one electron or muon are selected. The two hadronically decaying top quarks from the resonance decay are reconstructed using jets clustered with a large radius parameter of $$R=1$$ R = 1 . The invariant mass spectrum of the two top quark candidates is used to search for a resonance signal in the range of 1.0 $$\text {TeV}$$ TeV to 3.2 $$\text {TeV}$$ TeV . The presence of a signal is examined using an approach with minimal model dependence followed by a model-dependent interpretation. No significant excess is observed over the background expectation. Upper limits on the production cross section times branching ratio at 95% confidence level are provided for a heavy $$Z^\prime $$ Z ′ boson based on a simplified model, for $$Z^\prime $$ Z ′ mass between 1.0 $$\text {TeV}$$ TeV and 3.0 $$\text {TeV}$$ TeV . The observed (expected) limits range from 21 (14) fb to 119 (86) fb depending on the choice of model parameters.