The recently discovered soft gamma-ray emission from the anomalous X-ray pulsar 1E 1841-045 has a luminosity L _ { \gamma } \sim 10 ^ { 36 } ergs s ^ { -1 } . This luminosity exceeds the spindown power by three orders of magnitude and must be fed by an alternative source of energy such as an ultrastrong magnetic field . A gradual release of energy in the stellar magnetosphere is expected if it is twisted and a strong electric current is induced on the closed field lines . We examine two mechanisms of \gamma -ray emission associated with the gradual dissipation of this current . ( 1 ) A thin surface layer of the star is heated by the downward beam of current-carrying charges , which excite Langmuir turbulence in the layer . As a result , it can reach a temperature k _ { B } T \sim 100 keV and emit bremsstrahlung photons up to this characteristic energy . ( 2 ) The magnetosphere is also a source of soft \gamma -rays at a distance of \sim 100 km from the star , where the electron cyclotron energy is in the kilo-electron volt range . A large electric field develops in this region in response to the outward drag force felt by the current-carrying electrons from the flux of kilo-electron volt photons leaving the star . A seed positron injected in this region undergoes a runaway acceleration and upscatters X-ray photons above the threshold for pair creation . The created pairs emit a synchrotron spectrum consistent with the observed 20-100 keV emission . This spectrum is predicted to extend to higher energies and reach a peak at \sim 1 MeV .