Quantum-well (QW) states in {\it nonmagnetic} metal layers contained in
magnetic multilayers are known to be important in spin-dependent transport, but
the role of QW states in {\it magnetic} layers remains elusive. Here we
identify the conditions and mechanisms for resonant tunneling through QW states
in magnetic layers and determine candidate structures. We report
first-principles calculations of spin-dependent transport in epitaxial
Fe/MgO/FeO/Fe/Cr and Co/MgO/Fe/Cr tunnel junctions. We demonstrate the
formation of sharp QW states in the Fe layer and show discrete conductance
jumps as the QW states enter the transport window with increasing bias. At
resonance, the current increases by one to two orders of magnitude. The
tunneling magnetoresistance ratio is several times larger than in simple spin
tunnel junctions and is positive (negative) for majority- (minority-) spin
resonances, with a large asymmetry between positive and negative biases. The
results can serve as the basis for novel spintronic devices.Comment: 4 figures in 5 eps file