  The magnetars are believed to be highly magnetized neutron stars having
surface magnetic field 10^{14} - 10^{15} G. It is believed that at the center,
the magnetic field may be higher than that at the surface. We study the effect
of the magnetic field on the neutron star matter. We model the nuclear matter
with the relativistic mean field approach considering the possibility of
appearance of hyperons at higher density. We find that the effect of magnetic
field on the matter of neutron stars and hence on the mass-radius relation is
important, when the central magnetic field is atleast of the order of 10^{17}
G. Very importantly, the effect of strong magnetic field reveals anisotropy to
the system. Moreover, if the central field approaches 10^{19} G, then the
matter becomes unstable which limits the maximum magnetic field at the center
of magnetars.
