A magnetic lock (20) has at least one catch (36) having a lock plate (53). At least one first magnet (44) is arranged on the catch (36). The catch (36) can move back and forth between a locked position and unlocked position such that, when in unlocked position, the lock plate (53) at least partially closes a locating hole (26) for a shaft (22). Furthermore, a second magnet (48) is provided in the magnetic lock (20) that pulls the first magnet (44)—and the catch (36) along with it—into locked position.