A semi-inclusive measurement of charged hadron multiplicities in deep inelastic muon scattering off an isoscalar target was performed using data collected by the COMPASS Collaboration at CERN. The following kinematic domain is covered by the data: photon virtuality Q 2 > 1 ðGeV=cÞ 2 , invariant mass of the hadronic system W > 5 GeV=c 2 , Bjorken scaling variable in the range 0.003 < x < 0.4, fraction of the virtual photon energy carried by the hadron in the range 0.2 < z < 0.8, and square of the hadron transverse momentum with respect to the virtual photon direction in the range 0.02 ðGeV=cÞ 2 < P 2 hT < 3 ðGeV=cÞ 2 . The multiplicities are presented as a function of P 2 hT in three-dimensional bins of x, Q 2 , z and compared to previous semi-inclusive measurements. We explore the small-P 2 hT region, i.e. P 2 hT < 1 ðGeV=cÞ 2 , where hadron transverse momenta are expected to arise from nonperturbative effects, and also the domain of larger P 2 hT , where contributions from higher-order perturbative QCD are expected to dominate. The multiplicities are fitted using a single-exponential function at small P 2 hT to study the dependence of the average transverse momentum hP 2 hT i on x, Q 2 and z. The power-law behavior of the multiplicities at large P 2 hT is investigated using various functional forms. The fits describe the data reasonably well over the full measured range.