  It is shown that the Wahlquist metric, which is a stationary, axially
symmetric perfect fluid solution with $\rho+3p=\text{const.}$, admits a rank-2
generalized closed conformal Killing-Yano tensor with a skew-symmetric torsion.
Taking advantage of the presence of such a tensor, we obtain a
higher-dimensional generalization of the Wahlquist metric in arbitrary
dimensions, including a family of vacuum black hole solutions with spherical
horizon topology such as Schwarzschild-Tangherlini, Myers-Perry and
higher-dimensional Kerr-NUT-(A)dS metrics and a family of static, spherically
symmetric perfect fluid solutions in higher dimensions.
