We consider the transverse-momentum (qT ) distribution of Standard Model Higgs bosons produced by gluon fusion in hadron collisions. At small qT (qT ≪ mH , mH being the mass of the Higgs boson), we resum the logarithmically-enhanced contributions due to multiple soft-gluon emission to all order in QCD perturbation theory. At interme-diate and large values of qT (qT < mH), we consistently combine resummation with the known fixed-order results. We use the most advanced perturbative information that is available at present: next-to-next-to-leading logarithmic resummation combined with the next-to-leading fixed-order calculation. We extend previous results including exactly all the perturbative terms up to order αS in our computation and, after integration over qT, we recover the known next-to-next-to-leading order result for the total cross section. We present numerical results at the Tevatron and the LHC, together with an estimate of the corresponding uncertainties. Our calculation is implemented in an updated version of the numerical code HqT.