thanks once againThen it's inductive, and you should use a protective diode.
Also consider using a small capacitor in the neighborhood of 100pF-500pF to give the diode time to conduct. Switching is pretty quick, but it's not instantaneous. The capacitor will slow the rise time of the voltage spike.