I have run into the same problem described here and here, when I added diode to electromagnet. Basically, the magnet still holds with about 20kg force several minutes after removing power. The mechanical solution of leaving air gap or adding a "peel-off" spring is not plausible due to design constraints. So, I need a snubber circuit that will protect relay contacts why still de-energize the magnet rapidly.
While looking for the solution I've stumbled upon this answer, listing many possible methods. Not having any experience with powerful electromagnets I can't decide which one would be the best for this particular setup (24V 14W magnet, 30V 10A SRD-05VDC-SL-C relay).
At this moment I am leaning towards either rectifier + zener or RC + MOV combination. Any advice, please?
UPDATE
I've confirmed that the problem is residual magnetization, not back EMF, just as @DKNguyen and others suggested. After disconnecting power I also disconnected diode and the magnet was still holding. Apparently the initial experiment without diode was done with heavy (~200kg) load that was enough to hide the magnetization.
So, I am going with RC snubber, hoping that oscillations will provide sufficient demagnetizing effect. Maybe combined with MOV if initial amplitude is too high.