A locking device for a cover and the like which is locked by a first push and unlocked by a second push includes a case (1) which has at a work face (8), an elastic leg (7) provided with a follower (14); and a sliding member (2) which has, parallel to the work face (8), a planar cam surface (24) from which projects a central island (27) about which is formed a cam track for the follower (14). On the first push, the follower (14) passes from its free position (R) to its captive position (V) by a first path on the cam track and, on the second push, the follower (14) passes from its captive position (V) to its free position (R) by a second path distinct from the first path.