A magnetic actuator (100, 200, 300) comprising a first element (101, 201, 301) and a second element (102, 202, 302) movable with respect to the first element in a movement direction, wherein the first element comprises: - a first core section (103, 203) comprising first and second teeth (107, 108, 207, 208) successively in the movement direction and protruding towards the second element and a first yoke connected to the first and second teeth, - a first coil (105, 205) having a coil side between the first and second teeth and suitable for carrying electric current perpendicularly to the movement direction, - a second core section (104, 204) comprising third and fourth teeth (109, 110, 209, 210) successively in the movement direction and protruding towards the second element and a second yoke connected to the third and fourth teeth, and - a second coil (106, 206) having a coil side between the third and fourth teeth and suitable for carrying electric current perpendicularly to the movement direction, characterized in that the first element comprises: - a permanent magnet (111, 211) between the first and second core sections so that the first and second core sections are successively in the movement direction and the permanent magnet is adjacent to the second and third teeth, the permanent magnet having a direction of magnetization non-intersecting with the movement direction, wherein each of the first core section, the second core section, and the second element comprises material having relative magnetic permeability greater than one, and wherein the second element comprises fifth and sixth teeth (112, 113, 212, 213) successively in the movement direction and protruding towards the first element and a yoke connected to the fifth and sixth teeth, and wherein the fifth and sixth teeth are aligned with the first and third teeth respectively when the second element is in a first position with respect to the first element, the fifth and sixth teeth are aligned with the second and third teeth respectively when the second element is in a second position with respect to the first element, and the fifth and sixth teeth are aligned with the second and fourth teeth respectively when the second element is in a third position with respect to the first element. - a first core section (103, 203) comprising first and second teeth (107, 108, 207, 208) successively in the movement direction and protruding towards the second element and a first yoke connected to the first and second teeth, - a first coil (105, 205) having a coil side between the first and second teeth and suitable for carrying electric current perpendicularly to the movement direction, - a second core section (104, 204) comprising third and fourth teeth (109, 110, 209, 210) successively in the movement direction and protruding towards the second element and a second yoke connected to the third and fourth teeth, and - a second coil (106, 206) having a coil side between the third and fourth teeth and suitable for carrying electric current perpendicularly to the movement direction, - a permanent magnet (111, 211) between the first and second core sections so that the first and second core sections are successively in the movement direction and the permanent magnet is adjacent to the second and third teeth, the permanent magnet having a direction of magnetization non-intersecting with the movement direction,