Self-locking lock for a door or a window with a moveably-mounted wing, having a lock mechanism mounted in a lock case, the lock mechanism comprising: - a bolt, mounted moveably in the lock case, which can be moved into a retracted position in which the bolt is accommodated within the lock case and into an advanced position in which the bolt projects partially from the lock case, wherein the bolt is loaded by a spring in the direction of the advanced position, - a latch, mounted moveably in the lock case, which has a latch bolt head with a lead-in chamfer and a latch shank, wherein the latch can be moved into a retracted position in which the latch is retracted into the lock case and into an advanced position in which the latch bolt head projects from the lock case, - a control latch which can be moved into a retracted position in which the control latch is retracted into the lock case and into an advanced position in which the control latch projects partially from the lock case, - a blocking element, mounted moveably in the lock case, which interacts directly or indirectly with the bolt and which can be moved into a position in which the bolt is blocked, in which the blocking element retains the bolt in its retracted position, and into a position in which the bolt is not blocked, in which the blocking element enables the movement of the bolt from its retracted position into its advanced position, - a control element, mounted moveably in the lock case, which can be moved independently of the control latch, wherein the control element interacts with the blocking element in such a manner that, depending on the position of the control element, the blocking element can be coupled with the latch, that the latch interacts with the blocking element in such a manner that, as the latch is advanced, starting out from its position in which it can be coupled with the latch the blocking element is carried along from its position in which the bolt is blocked into its position in which the bolt is not blocked, that, in its position in which it can be coupled with the latch, the blocking element forms and/or comprises a driver stop interacting with the latch or with a part connected with the latch, characterised in that the part connected with the latch, which interacts with the driver stop, is configured as a release element mounted moveably on the latch which, in the couplable position of the blocking element, can be brought to bear against the driver stop of the blocking element. - a bolt, mounted moveably in the lock case, which can be moved into a retracted position in which the bolt is accommodated within the lock case and into an advanced position in which the bolt projects partially from the lock case, wherein the bolt is loaded by a spring in the direction of the advanced position, - a latch, mounted moveably in the lock case, which has a latch bolt head with a lead-in chamfer and a latch shank, wherein the latch can be moved into a retracted position in which the latch is retracted into the lock case and into an advanced position in which the latch bolt head projects from the lock case, - a control latch which can be moved into a retracted position in which the control latch is retracted into the lock case and into an advanced position in which the control latch projects partially from the lock case, - a blocking element, mounted moveably in the lock case, which interacts directly or indirectly with the bolt and which can be moved into a position in which the bolt is blocked, in which the blocking element retains the bolt in its retracted position, and into a position in which the bolt is not blocked, in which the blocking element enables the movement of the bolt from its retracted position into its advanced position, - a control element, mounted moveably in the lock case, which can be moved independently of the control latch,