The production of a prompt photon in association with a Z boson is studied in proton-proton collisions at a centre-of-mass energy √ s = 13 TeV. The analysis uses a data sample with an integrated luminosity of 139 fb−1 collected by the ATLAS detector at the LHC from 2015 to 2018. The production cross-section for the process pp → ` +` −γ + X (` = e, µ) is measured within a fiducial phase-space region defined by kinematic requirements on the photon and the leptons, and by isolation requirements on the photon. An experimental precision of 2.9% is achieved for the fiducial cross-section. Differential crosssections are measured as a function of each of six kinematic variables characterising the ` +` −γ system. The data are compared with theoretical predictions based on next-toleading-order and next-to-next-to-leading-order perturbative QCD calculations. The impact of next-to-leading-order electroweak corrections is also considered.