The invention relates to a method of MR imaging near metal parts using SEMAC. It is an object of the invention to provide an improved MR imaging technique that is sufficiently fast and robust against susceptibility effects. The invention proposes to apply a weaker slice-selection magnetic field gradient (Gslice) for reduction of ripple-artefacts near metal parts or to apply undersampling in the slice-selection direction of the SEMAC sequence or to apply both these aspects. According to one aspect of the invention, a sparsity constraint is used to make the reconstruction of the undersampled MR images more stable. Moreover, the invention relates to a MR device (1) and to a computer program to be run on a MR device (1).