A search for the single production of a vectorlike top partner (T) with mass greater than 1 TeV decaying into a Z boson and a top quark is presented, using the full Run 2 dataset corresponding to 139 fb−1 of pp collisions at s=13 TeV, collected in 2015–2018 with the ATLAS detector at the Large Hadron Collider. The targeted final state is characterized by the presence of a pair of electrons or muons with opposite-sign charges which form a Z-boson candidate, as well as by the presence of b-tagged jets and forward jets. Events with exactly two or at least three leptons are categorized into two independently optimized analysis channels. No significant excess above the background expectation is observed and the results from the two channels are statistically combined to set exclusion limits at 95% confidence level on the masses and couplings of T. The results are interpreted in several benchmark scenarios to set limits on the mass and universal coupling strength (κ) of the vectorlike quark. For singlet T quarks, κ values between 0.22 and 0.64 are excluded for masses between 1000 and 1975 GeV. For T quarks in the doublet scenario, where the production cross section is much lower, κ values between 0.54 and 0.88 are excluded for masses between 1000 and 1425 GeV. © 2024 CERN, for the ATLAS Collaboration 2024 CERN