We show that a single change in the derivation of the linearized semiclassical-initial value representation (LSC-IVR or 'classical Wigner approximation') results in a classical dynamics which conserves the quantum Boltzmann distribution. We rederive the (standard) LSC-IVR approach by writing the (exact) quantum time-correlation function in terms of the normal modes of a free ring-polymer (i.e. a discrete imaginary-time Feynman path), taking the limit that the number of polymer beads N → ∞, such that the lowest normal-mode frequencies take their 'Matsubara' values. The change we propose is to truncate the quantum Liouvillian, not explicitly in powers of 2 at 0 (which gives back the standard LSC-IVR approximation), but in the normalmode derivatives corresponding to the lowest Matsubara frequencies. The resulting 'Matsubara' dynamics is inherently classical (since all terms O( 2 ) disappear from the Matsubara Liouvillian in the limit N → ∞), and conserves the quantum Boltzmann distribution because the Matsubara Hamiltonian is symmetric with respect to imaginary-time translation. Numerical tests show that the Matsubara approximation to the quantum timecorrelation function converges with respect to the number of modes, and gives better agreement than LSC-IVR with the exact quantum result. Matsubara dynamics is too computationally expensive to be applied to complex systems, but its further approximation may lead to practical methods.