A closure for a window, a door or the like, wherein the window, the door or the like has a frame and a leaf movable with respect to the frame and the closure is configured for a releasable fixing of the leaf to the frame in the assembled state, wherein the closure comprises: a base body configured for fastening to the frame or to the leaf; and a plurality of components (14, 19, 21, 26) movable with respect to the base body, wherein a plurality of functional states of the closure are defined by different positions of the movable components (14, 19, 21, 26); a sensor arrangement which is configured to monitor the different positions of the movable components (14, 19, 21, 26) and to output respective position signals; and an electronic evaluation device which is configured to receive the position signals and, on the basis of a comparison of the position signals with respective default values, to generate a status signal which indicates the instantaneous functional state of the closure, characterized in that the movable components (14, 19, 21, 26) comprise a closure element which is rotatably supported at the base body, which defines a holding receiver for a latch element fastened to the leaf or to the frame and which is movable between a release position releasing the latch element in an opening direction of the leaf and a blocking position blocking the latch element in the opening direction, with the sensor arrangement being configured to monitor the rotational position of the closure element, with the closure comprising the latch element and the sensor arrangement comprising a proximity sensor which is arranged in the region of the holding receiver of the closure element located in the blocking position and which is configured to recognize the latch element located in the holding receiver. a base body configured for fastening to the frame or to the leaf; and a plurality of components (14, 19, 21, 26) movable with respect to the base body, wherein a plurality of functional states of the closure are defined by different positions of the movable components (14, 19, 21, 26); a sensor arrangement which is configured to monitor the different positions of the movable components (14, 19, 21, 26) and to output respective position signals; and an electronic evaluation device which is configured to receive the position signals and, on the basis of a comparison of the position signals with respective default values, to generate a status signal which indicates the instantaneous functional state of the closure, the movable components (14, 19, 21, 26) comprise a closure element which is rotatably supported at the base body, which defines a holding receiver for a latch element fastened to the leaf or to the frame and which is movable between a release position releasing the latch element in an opening direction of the leaf and a blocking position blocking the latch element in the opening direction, with the sensor arrangement being configured to monitor the rotational position of the closure element, with the closure comprising the latch element and the sensor arrangement comprising a proximity sensor which is arranged in the region of the holding receiver of the closure element located in the blocking position and which is configured to recognize the latch element located in the holding receiver.