On the basis of discrete element numerical simulations of a Couette cell, we revisit the rheology of granular materials in the quasistatic and inertial regimes, and discuss the origin of the transition between these two regimes. We show that quasistatic zones are the seat of a creep process whose rate is directly related to the existence and magnitude of velocity fluctuations. The mechanical behavior in the quasistatic regime is characterized by a three-variable constitutive law relating the friction coefficient (normalized stress), the inertial number (normalized shear rate), and the normalized velocity fluctuations. Importantly, this constitutive law appears to remain also valid in the inertial regime, where it can account for the one-to-one relationship observed between the friction coefficient and the inertial number. The abrupt transition between the quasistatic and inertial regimes is then related to the mode of production of the fluctuations within the material, from nonlocal and artificially sustained by the boundary conditions in the quasistatic regime, to purely local and self-sustained in the inertial regime. This quasistatic-to-inertial transition occurs at a critical inertial number or, equivalently, at a critical level of fluctuations.