A three-dimensional non-linear toroidal MHD code, MH3D, has been used to study sawtooth oscillations in tokamaks. The simulation results at high temperature agree with the Kadomtsev model, but good agreement with experiment is obtained only if neoclassical resistivity is used. The result Δq0 ≃ 0.2 is much larger than the value Δq0 ≃ 0.01 obtained with classical resistivity. To understand this, a formula for q0(t) is derived. A functional dependence of the sawtooth period and a semi-empirical scaling law are presented. There is some evidence that the fast crash time is due to enhanced resistivity at the singular current sheet.