This work presents a new physical model of the star formation rate (SFR), tested with a large set of numerical simulations of driven, supersonic, self-gravitating, magneto-hydrodynamic (MHD) turbulence, where collapsing cores are captured with accreting sink particles. The model depends on the relative importance of gravitational, turbulent, magnetic, and thermal energies, expressed through the virial parameter, αvir, the rms sonic Mach number, S,0, and the ratio of mean gas pressure to mean magnetic pressure, β0. The SFR is predicted to decrease with increasing αvir (stronger turbulence relative to gravity), and to depend weakly on S,0 and β0, for values typical of star forming regions (S,0≈4-20 and β0≈1-20). The star-formation simulations used to test the model result in an approximately constant SFR, after an initial transient phase. Both the value of the SFR and its dependence on the virial parameter found in the simulations agree very well with the theoretical predictions.