We study the C8.4-class solar flare SOL2016-05-14T11:34 UT using high-resolution spectral imaging in the Ca II 8542Å line obtained with the CRISP imaging spectropolarimeter on the Swedish 1m Solar Telescope. Spectroscopic inversions of the Ca II 8542 Å line using the non-LTE code NICOLE are used to investigate the evolution of the temperature and velocity structure in the flaring chromosphere. A comparison of the temperature stratification in flaring and non-flaring areas reveals strong footpoint heating during the flare peak in the lower atmosphere. The temperature of the flaring footpoints between log t500 » -2.5 and - 3.5, where τ500 is the continuum optical depth at 500 nm, is ~5–6.5 kK close to the flare peak, reducing gradually to ~5 kK. The temperature in the middle and upper chromosphere, between log t500 » -3.5 and −5.5, is estimated to be ∼6.5–20 kK, decreasing to preflare temperatures, ∼5–10 kK, after approximately 15 minutes. However, the temperature stratification of the non-flaring areas is unchanged. The inverted velocity fields show that the flaring chromosphere is dominated by weak downflowing condensations at the formation height of Ca II 8542 Å.