Collinear and transverse-momentum-dependent (TMD) parton densities are obtained from fits to precision measurements of deep-inelastic scattering (DIS) cross sections at HERA. The parton densities are evolved by Dokshitzer-Gribov-Lipatov-Altarelli-Parisi evolution with next-to-leading-order (NLO) splitting functions using the parton branching method, allowing one to determine simultaneously collinear and TMD densities for all flavors over a wide range in x, μ 2 and k t , relevant for predictions at the LHC. The DIS cross section is computed from the parton densities using perturbative NLO coefficient functions. Parton densities satisfying angular ordering conditions are presented. Two sets of parton densities are obtained, differing in the renormalization scale choice for the argument in the strong coupling α s. This is taken to be either the evolution scale μ or the transverse momentum q t. While both choices yield similarly good χ 2 values for the fit to DIS measurements, the gluon density especially turns out to differ between the two sets. The TMD densities are used to predict the transverse momentum spectrum of Z bosons at the LHC.