A radially decreasing toroidal rotation frequency can have a stabilizing effect on nonaxisymmetric magnetohydrodynamic (MHD) instabilities. We show that this is a consequence of the Coriolis effect that induces a restoring pressure gradient force when plasma is perturbed radially. In a rotating cylindrical plasma, this Coriolis-pressure effect is canceled by the centrifugal effect responsible for the magnetorotational instability. In a magnetically confined toroidal plasma, a large aspect ratio expansion shows that only half of the effect is canceled. This analytical result is confirmed by numerical computations. When the plasma rotates faster toroidally in the core than near the edge, the effect can contribute to the formation of transport barriers by stabilizing MHD instabilities.