A measurement of prompt photon-pair production in proton-proton collisions at s = 13 TeV is presented. The data were recorded by the ATLAS detector at the LHC with an integrated luminosity of 139 fb−1. Events with two photons in the well-instrumented region of the detector are selected. The photons are required to be isolated and have a transverse momentum of pT,γ1(2)> 40 (30) GeV for the leading (sub-leading) photon. The differential cross sections as functions of several observables for the diphoton system are measured and compared with theoretical predictions from state-of-the-art Monte Carlo and fixed-order calculations. The QCD predictions from next-to-next-to-leading-order calculations and multi-leg merged calculations are able to describe the measured integrated and differential cross sections within uncertainties, whereas lower-order calculations show significant deviations, demonstrating that higher-order perturbative QCD corrections are crucial for this process. The resummed predictions with parton showers additionally provide an excellent description of the low transverse-momentum regime of the diphoton system. [Figure not available: see fulltext.].