In a method for acquisition of magnetic resonance images of the heart, MR signals of the heart are acquired using an imaging sequence, wherein the magnetization is inverted by an RF inversion pulse before the acquisition of the MR signals and of the heart activity is detected, and the point in time of the switching of the RF inversion pulse dependent on the detected heart activity.