A control mechanism for stopping x-ray pulses in resonant nuclear media is investigated theoretically. We show that narrow-band x-ray pulses can be mapped and stored as nuclear coherence in a thin-film planar x-ray cavity with an embedded 57 Fe nuclear layer. The pulse is nearly resonant to the 14.4 keV Mössbauer transition in the 57 Fe nuclei. The role of the control field is played here by a hyperfine magnetic field which induces interference effects reminding of electromagnetically induced transparency. We show that by switching off the control magnetic field, a narrow-band x-ray pulse can be completely stored in the cavity for approximately hundred ns. Additional manipulation of the external magnetic field can lead to both group velocity and phase control of the pulse in the x-ray cavity sample. PACS numbers: 78.70.Ck, 42.50.Md, 42.50.Nn, 76.80.+y Keywords: Recent years have witnessed the commissioning of coherent x-ray sources opening the new field of x-ray quantum optics [1].While not yet as advanced as its optical counterpart, the latter may enable coherent control of x-rays, with potential applications for the fields of metrology, material science, quantum information, biology and chemistry. The desirable properties of x-rays are deeper penetration, better focus, no longer limited by an inconvenient diffraction limit as for optical photons, correspondingly spatial resolution, robustness, and the large momentum transfer they may produce. A peculiar circumstance is that x-rays are resonant to either inner shell electron transitions in (highly) charged ions [2-4], or transitions in atomic nuclei [5,6]. First experiments towards the demonstration of nonlinear phenomena with x-rays have been performed with atoms [7][8][9][10] and nuclei [6,[11][12][13][14][15][16]. Nonlinear interactions between x-rays and nuclei are a promising candidate to control x-ray pulses, which remains challenging so far [6,13,14,17]. High-performance control over x-rays is compulsory if also x-ray qubit applications in quantum information or cryptography are to be realized [16,18], such as, for instance, preparation of entangled ensembles [19], generation of squeezed states [20], quantum memories [21,22] or photonic circuits [23][24][25][26], already accomplished in the long-wavelength regime. Main difficulties compared to the optical regime are the lack of high quality factor cavities and of suitable level schemes that would facilitate established control schemes.In this Letter, we demonstrate from the theory side that a spectrally narrow x-ray pulse can be mapped and stored as nuclear coherence in a thin-film planar x-ray cavity [27] with embedded layers containing nuclei with a transition resonant to the x-ray pulse. This novel storage mechanism relies on interference effects possible due to the occurrence of spontaneously generated coherences specific to the nuclear system [12]. We lay out the theoretical formalism for describing this system and show that storage can be described by the formation of a dark-state polariton [28...