An electronic theft-preventing system, comprising: a first multi-axis magnetometer arranged in a first station at a first position and configured to output a first vector signal representing movement of a first magnetic field vector; a second multi-axis magnetometer (102;104) arranged in a second station at a second position and configured to output a second vector signal (vs1;vs3) representing movement of a second magnetic field vector; wherein the second position is different from the first position; and a signal processor coupled to receive the first vector signal and the second vector signal, and configured to: estimate a first multi-dimensional transformation, which represents a difference between the first magnetic field vector and the second magnetic field vector; generate a first compensation signal from a transformation of the first vector signal in accordance with the first multi-dimensional transformation; generate a compensated second vector signal from the second vector signal and the first compensation signal; determine that a detector signal, which is responsive to the compensated second vector signal, meets a predefined criterion; and in response to at least the determining that the detector signal meets the predefined criterion, raising or forgo raising a first alarm that warns about a possible theft-related event. a first multi-axis magnetometer arranged in a first station at a first position and configured to output a first vector signal representing movement of a first magnetic field vector; a second multi-axis magnetometer (102;104) arranged in a second station at a second position and configured to output a second vector signal (vs1;vs3) representing movement of a second magnetic field vector; wherein the second position is different from the first position; and a signal processor coupled to receive the first vector signal and the second vector signal, and configured to: estimate a first multi-dimensional transformation, which represents a difference between the first magnetic field vector and the second magnetic field vector; generate a first compensation signal from a transformation of the first vector signal in accordance with the first multi-dimensional transformation; generate a compensated second vector signal from the second vector signal and the first compensation signal; determine that a detector signal, which is responsive to the compensated second vector signal, meets a predefined criterion; and in response to at least the determining that the detector signal meets the predefined criterion, raising or forgo raising a first alarm that warns about a possible theft-related event. estimate a first multi-dimensional transformation, which represents a difference between the first magnetic field vector and the second magnetic field vector; generate a first compensation signal from a transformation of the first vector signal in accordance with the first multi-dimensional transformation; generate a compensated second vector signal from the second vector signal and the first compensation signal; determine that a detector signal, which is responsive to the compensated second vector signal, meets a predefined criterion; and in response to at least the determining that the detector signal meets the predefined criterion, raising or forgo raising a first alarm that warns about a possible theft-related event.