An electromechanical lock comprising: an electronic circuit configured to read data from an external source and match the data against a predetermined criterion; an actuator comprising a permanent magnet arrangement movable from a locked position to an open position by electric power; and an access control mechanism configured to be rotatable by a user; wherein in the locked position, the permanent magnet arrangement is configured and positioned to create and direct a near magnetic field to block the access control mechanism to rotate, and simultaneously the permanent magnet arrangement is configured and positioned to create and attenuate a range and a magnitude of the near magnetic field towards a far magnetic break-in field originating from outside of the electromechanical lock , whereas in the open position, the permanent magnet arrangement is configured and positioned to create and direct a reversed near magnetic field to release the access control mechanism to rotate, and simultaneously the permanent magnet arrangement is configured and positioned to create and attenuate a range and a magnitude of the reversed near magnetic field towards the far magnetic break-in field , wherein the access control mechanism comprises one or more movable magnetic pins configured and positioned to block the access control mechanism to rotate when affected by the near magnetic field , or to release the access control mechanism to rotate when affected by the reversed near magnetic field , and wherein the permanent magnet arrangement comprises a first axis between poles, and the magnetic pin comprises a second axis between poles, and the first axis is transversely against the second axis both in the locked position and in the open position . an electronic circuit configured to read data from an external source and match the data against a predetermined criterion; an actuator comprising a permanent magnet arrangement movable from a locked position to an open position by electric power; and an access control mechanism configured to be rotatable by a user; wherein in the locked position, the permanent magnet arrangement is configured and positioned to create and direct a near magnetic field to block the access control mechanism to rotate, and simultaneously the permanent magnet arrangement is configured and positioned to create and attenuate a range and a magnitude of the near magnetic field towards a far magnetic break-in field originating from outside of the electromechanical lock , whereas in the open position, the permanent magnet arrangement is configured and positioned to create and direct a reversed near magnetic field to release the access control mechanism to rotate, and simultaneously the permanent magnet arrangement is configured and positioned to create and attenuate a range and a magnitude of the reversed near magnetic field towards the far magnetic break-in field , wherein the access control mechanism comprises one or more movable magnetic pins configured and positioned to block the access control mechanism to rotate when affected by the near magnetic field , or to release the access control mechanism to rotate when affected by the reversed near magnetic field , and wherein the permanent magnet arrangement comprises a first axis between poles, and the magnetic pin comprises a second axis between poles, and the first axis is transversely against the second axis both in the locked position and in the open position . <EOS>