This paper presents an analysis at next-to-next-to-leading order in the theory of quantum chromodynamics for the determination of a new set of proton parton distribution functions using diverse measurements in pp collisions at s=7, 8 and 13 TeV, performed by the ATLAS experiment at the Large Hadron Collider, together with deep inelastic scattering data from ep collisions at the HERA collider. The ATLAS data sets considered are differential cross-section measurements of inclusive W± and Z/ γ∗ boson production, W± and Z boson production in association with jets, tt¯ production, inclusive jet production and direct photon production. In the analysis, particular attention is paid to the correlation of systematic uncertainties within and between the various ATLAS data sets and to the impact of model, theoretical and parameterisation uncertainties. The resulting set of parton distribution functions is called ATLASpdf21.