Electromagnetic actuators (10) are used, for example, to focus a lens in an endoscope (10). Actuators (10) of the type in question are very small. Even very small, production-caused variations in the dimensioning of the permanent magnets (20, 21) of the actuator (10) have a negative effect on the field line pattern of the magnets (20, 21) and therefore on the switching behavior of the actuator (10). The invention relates to an actuator (10) that can be switched particularly reliably. This is achieved in that the permanent magnets (20, 21) are arranged in such a way that a magnetic south pole (25) of the one permanent magnet (20, 21) faces a magnetic north pole (24) of the other permanent magnet (20, 21).