Preventing relay contacts from sparking on disconnect
Assuming it's a 12V DC PM motor (and assuming you're not reversing current to the motor, or allowing the motor to be driven backward from the shaft) you can put a diode across the motor. 

Diode PIV rating has to be sufficient to handle any transients on the 12V line. Current rating needs to be high enough to absorb the magnetic field energy in your particular motor under all conditions (including stall).