  Magnetars are highly magnetized neutron stars whose magnetic dipole ranges
from $10^{14}$ to $10^{15}$ G. The MRI is considered to be a promising
mechanism to amplify the magnetic field in fast-rotating protoneutron stars and
form magnetars. This scenario is supported by many local studies showing that
magnetic fields could be amplified by the MRI on small scales. However, the
efficiency of the MRI at generating a dipole field is still unknown. To answer
this question, we study the MRI dynamo in an idealized global model of a fast
rotating protoneutron star with differential rotation. We perform 3D
incompressible MHD simulations in spherical geometry with explicit
diffusivities where the differential rotation is forced at the outer boundary.
We vary the initial magnetic field and investigated different magnetic boundary
conditions. These simulations were compared to local shearing box simulations.
We obtain a self-sustained turbulent MRI-driven dynamo, whose saturated state
is independent of the initial magnetic field. The MRI generates a strong
turbulent magnetic field of $B \geq 2\times 10^{15}$ G and a non-dominant
magnetic dipole, which represents systematically about $5\%$ of the averaged
magnetic field strength. Interestingly, this dipole is tilted towards the
equatorial plane. We find that local shearing box models can reproduce fairly
well several characteristics of global MRI turbulence such as the kinetic and
magnetic spectra. The turbulence is nonetheless more vigorous in the local
models than in the global ones. Overall, our results support the ability of the
MRI to form magnetar-like large-scale magnetic fields. They furthermore predict
the presence of a stronger small-scale magnetic field. The resulting magnetic
field could be important to power outstanding stellar explosions, such as
superluminous supernovae and GRBs.

High Energy Astrophysical Phenomena;Solar and Stellar Astrophysics;Fluid Dynamics