The collapse stage of an air bubble immersed in a stagnant viscous liquid is experimentally and theoretically investigated, focusing on the effect of liquid viscosity on the final instants previous to pinch-off. Our experiments are consistent with recent investigations, and at the same time highlight several important limitations of previous works. In particular, it is shown that the use of a power law to describe the collapse dynamics of the bubble is not appropriate in an intermediate range of liquid viscosities, for which a transition from an inviscid to a fully viscous pinch-off takes place. Under these conditions, the instantaneous exponent α(τ) varies during a single pinch-off event from the typical values of inviscid collapse, α ≃ 0.58, to the value corresponding to a fully viscous dynamics, α ≃ 1. Consequently, the effective exponent of the power law is not correctly defined in these cases. However, as in the work of Bolaños-Jiménez et al. [Phys. Fluids 20, 112104 (2008) ], we show that the pinch-off process can be accurately described by the use of a pair of Rayleigh-like differential equations for the time evolution of the minimum radius, R0, and half the axial curvature evaluated at the minimum radius, r1. In particular, the theoretical model is able to describe the smooth transition which takes place from inviscid to viscous-dominated pinch-off in liquids of intermediate viscosity, 10 ≤ μ ≤ 100 cP, and accounts for the fact that the axial curvature remains constant when the local Reynolds number becomes small enough, in close agreement with our experimental measurements.