Context. The star Kepler-1625 recently attracted considerable attention when an analysis of the stellar photometric time series from the Kepler mission was interpreted as showing evidence of a large exomoon around the transiting Jupiter-sized planet candidate Kepler-1625 b. The mass of Kepler-1625 b, however, has not been determined independently and its planetary nature has formally not been validated. Moreover, Kepler's long-period Jupiter-sized planet candidates, like Kepler-1625 b with an orbital period of about 287 d, are known to have a high false alarm probability. Hence, an independent confirmation of Kepler-1625 b is particularly important. Aims. We aim to detect the radial velocity (RV) signal imposed by Kepler-1625 b (and its putative moon) on the host star or, as the case may be, determine an upper limit on the mass of the transiting object (or the combined mass of the two objects). Methods. We took a total of 22 spectra of Kepler-1625 using CARMENES, 20 of which were useful. Observations were spread over a total of seven nights between October 2017 and October 2018, covering 125 % of one full orbit of Kepler-1625 b. We used the automatic Spectral Radial Velocity Analyser (SERVAL) pipeline to deduce the stellar RVs and uncertainties. Then we fitted the RV curve model of a single planet on a Keplerian orbit to the observed RVs using a χ 2 minimisation procedure. Results. We derive upper limits on the mass of Kepler-1625 b under the assumption of a single planet on a circular orbit. In this scenario, the 1 σ, 2 σ, and 3 σ confidence upper limits for the mass of Kepler-1625 b are 2.90 M J , 7.15 M J , and 11.60 M J , respectively (M J being Jupiter's mass). An RV fit that includes the orbital eccentricity and orientation of periastron as free parameters also suggests a planetary mass but is statistically less robust. Conclusions. We present strong evidence for the planetary nature of Kepler-1625 b, making it the 10th most long-period confirmed planet known today. Our data does not answer the question about a second, possibly more short-period planet that could be responsible for the observed transit timing variation of Kepler-1625 b.