Anti-pinch sensor (100, 200, 300, 400) for a closure element of a motor vehicle, in particular for a tailgate, movable between an open position and a closed position, comprising: a circuit (20, 40, 60, 80) which is designed to generate a measuring signal and which has a sensor element (21, 41, 61, 81) which is designed to detect an object in the range of movement of the closure element, and a measuring element (22, 42, 62, 82) which interacts with the sensor element (21, 41, 61, 81) to generate the measuring signal and comprises an illuminating means (23, 43, 63, 83) for generating and emitting light; a base profile (110, 210, 310, 410) designed to be secured to the closure member; and a holder (130, 230, 330, 430) for non-positively and/or positively securing the illuminating means (23, 43, 63, 83) arranged on the base profile (110, 210, 310, 410); wherein the sensor element (21, 41, 61, 81) comprises a sensor profile (120, 220, 320, 420) which is arranged on the base profile (110, 210, 310, 410); wherein the sensor element (21, 41, 61, 81) and the measuring element (22, 42, 62, 82) are electrically connected to one another; wherein the sensor element (21, 61, 61, 81) has a ground electrode and a counter-electrode which are designed to be movable relative to one another and are formed from an electrically conductive elastomer; wherein the illuminating means (23, 43, 63, 83) is electrically connected with the base electrode and the counter electrode; wherein the lighting means (23, 43, 63, 83) comprises an illuminating element (24, 44, 46, 64, 84) designed to generate light and having a ground terminal (24a, 44a, 46a, 64a, 84a) and a supply terminal (24b, 44b, 46b, 64b, 84b); and wherein the ground terminal (24a, 44a, 46a, 64a, 84a) is electrically connected to the ground electrode and/or the supply terminal (24b, 44b, 46b, 64b, 84b) is electrically connected to the counter electrode. a circuit (20, 40, 60, 80) which is designed to generate a measuring signal and which has a sensor element (21, 41, 61, 81) which is designed to detect an object in the range of movement of the closure element, and a measuring element (22, 42, 62, 82) which interacts with the sensor element (21, 41, 61, 81) to generate the measuring signal and comprises an illuminating means (23, 43, 63, 83) for generating and emitting light; a base profile (110, 210, 310, 410) designed to be secured to the closure member; and a holder (130, 230, 330, 430) for non-positively and/or positively securing the illuminating means (23, 43, 63, 83) arranged on the base profile (110, 210, 310, 410); wherein the sensor element (21, 41, 61, 81) comprises a sensor profile (120, 220, 320, 420) which is arranged on the base profile (110, 210, 310, 410); wherein the sensor element (21, 41, 61, 81) and the measuring element (22, 42, 62, 82) are electrically connected to one another; wherein the sensor element (21, 61, 61, 81) has a ground electrode and a counter-electrode which are designed to be movable relative to one another and are formed from an electrically conductive elastomer; wherein the illuminating means (23, 43, 63, 83) is electrically connected with the base electrode and the counter electrode; wherein the lighting means (23, 43, 63, 83) comprises an illuminating element (24, 44, 46, 64, 84) designed to generate light and having a ground terminal (24a, 44a, 46a, 64a, 84a) and a supply terminal (24b, 44b, 46b, 64b, 84b); and wherein the ground terminal (24a, 44a, 46a, 64a, 84a) is electrically connected to the ground electrode and/or the supply terminal (24b, 44b, 46b, 64b, 84b) is electrically connected to the counter electrode.