  We present a dynamical study of the eclipsing intermediate polar XY Ari based
on time-resolved near-infrared spectroscopy obtained with the EMIR spectrograph
on the 10.4-m Gran Telescopio Canarias. Using main sequence template spectra
taken with the same instrument setup as the target spectra, we measure a radial
velocity amplitude of the late K-type donor star $K_2=256 \pm 2$ km s$^{-1}$.
We also obtain the rotational broadening of its photospheric lines
$v_\mathrm{rot} \sin i = 141 \pm 3$ km s$^{-1}$. From these and the eclipse
geometry, we derive a donor-to-white-dwarf mass ratio $q = M_2/M_1 = 0.62 \pm
0.02$, an orbital inclination $i = 80.8^{\circ} \pm 0.5^{\circ}$ and dynamical
masses $M_{1} = 1.21 \pm 0.04 \, \mathrm{M}_{\odot}$ and $M_2 = 0.75 \pm 0.04
\, \mathrm{M}_{\odot}$ ($1 \sigma$). This result places the white dwarf in XY
Ari as one of the three most massive known in a cataclysmic variable.
Comparison with white dwarf mass estimates from X-ray spectral studies could
indicate the necessity of an improvement of the X-ray models and/or analysis
techniques, as a number of X-ray white dwarf masses are in disagreement with
the dynamical mass value.
