We present the first detection of a gravitational depletion signal at near-infrared wavelengths, based on deep panoramic images of the cluster Abell 2219 (z=0.22) taken with the Cambridge Infrared Survey Instrument (CIRSI) at the prime focus of the 4.2-m William Herschel Telescope. Infrared studies of gravitational depletion offer a number of advantages over similar techniques applied at optical wavelengths, and can provide reliable total masses for intermediate-redshift clusters. Using the maximum-likelihood technique developed by Schneider, King & Erben, we detect the gravitational depletion at the 3σ confidence level. By modelling the mass distribution as a singular isothermal sphere and ignoring the uncertainty in the unlensed number counts, we find an Einstein radius of θ_E ≃ 13.7^(+3.9)_(-4.2) arcsec (66 per cent confidence limit). This corresponds to a projected velocity dispersion of σᵥ∼800 km s⁻¹, in agreement with constraints from strongly lensed features. For a Navarro, Frenk & White mass model, the radial dependence observed indicates a best-fitting halo scalelength of 125h⁻¹ kpc. We investigate the uncertainties arising from the observed fluctuations in the unlensed number counts, and show that clustering is the dominant source of error. We extend the maximum-likelihood method to include the effect of incompleteness, and discuss the prospects of further systematic studies of lensing in the near-infrared band