The magnetorotational instability (MRI) occurs when a weak magnetic field destabilises a rotating, electrically conducting fluid with inwardly increasing angular velocity. The MRI is essential to astrophysical disk theory where the shear is typically Keplerian. Internal shear layers in stars may also be MRI unstable, and they take a wide range of profiles, including near-critical. We show that the fastest growing modes of an ideal magnetofluid are three-dimensional provided the shear rate, $S$, is near the two-dimensional onset value, $S_c$. For a Keplerian shear, three-dimensional modes are unstable above $S\approx0.10S_c$, and dominate the two-dimensional modes until $S\approx2.05S_{c}$. These three-dimensional modes dominate for shear profiles relevant to stars and at magnetic Prandtl numbers relevant to liquid-metal laboratory experiments. Significant numbers of rapidly growing three-dimensional modes remain well past $2.05S_{c}$. These finding are significant in three ways. First, weakly nonlinear theory suggests that the MRI saturates by pushing the shear rate to its critical value. This can happen for systems, like stars and laboratory experiments, that can rearrange their angular velocity profiles. Second, the non-normal character and large transient growth of MRI modes should be important whenever three-dimensionality exists. Finally, three-dimensional growth suggests direct dynamo action driven from the linear instability.