A a magnetic random access memory (MRAM) device includes a cap layer
formed over a magnetic tunnel junction (MTJ) stack layer, an etch stop
layer formed over the first cap layer, and a hardmask layer formed over
the etch stop layer. The etch stop layer is selected from a material such
that an etch chemistry used for removing the hardmask layer has
selectivity against etching the etch stop layer material.