  In the present paper we focus on building simple nonperturbative analytical
relativistic models of magnetars. With this purpose in mind we first develop a
method for generating exact interior solutions to the static and axisymmetric
Einstein-Maxwell-hydrodynamic equations with anisotropic perfect fluid and with
pure poloidal magnetic field. Then using an explicit exact solution we present
a simple magnetar model and calculate some physically interesting quantities as
the surface elipticity and the total energy of the magnetized star.
