A safety endcap assembly (25, 200) to be arranged at an end of an LED lamp having a plurality of LEDs, the safety endcap assembly (25, 200) comprising: - an endcap base element to be arranged at an end of a housing of the LED lamp; - a connector pin (205, 207) extending along an axis; - an endcap cover element moveable relative to the endcap base element along the axis, between a protracted position, in which the endcap cover element is more away from the endcap base element, and a retracted position, in which the endcap cover element is closer to the endcap base element; - a contact element (217, 219) for electrically connecting the connector pin (205, 207) to the LEDs; - a switch button movable between a first position and a second position, wherein the switch button is arranged to disconnect contact element (217, 219) from the LEDs when the switch button is in the first position, and wherein the safety endcap assembly further comprises: - a first spring mechanism for urging the endcap cover element towards the protracted position; and - a switch opening mechanism configured such that in case the switch button is in the second position, and the endcap cover element moves from the retracted position towards the protracted position over a predetermined distance, the switch button is moved to the first position to block the electrical connection between the contact element (217, 219) and the LEDs, characterized in that the contact element (217, 219) is connected to the connector pin (205, 207) via a spring (221, 223), wherein the spring (221, 223) defines a variable length, including a first length, which corresponds to a natural state of the spring (221, 223) in an absence of an external force, and a second length, which corresponds to a compression state of the spring (221, 223) when the endcap cover element is in the retracted position and the switch button is in the second position, wherein the first length, the second length and the predetermined distance are arranged to satisfy a following inequality: D < A − B, where D is the predetermined distance, A is the first length, and B is the second length. - an endcap base element to be arranged at an end of a housing of the LED lamp; - a connector pin (205, 207) extending along an axis; - an endcap cover element moveable relative to the endcap base element along the axis, between a protracted position, in which the endcap cover element is more away from the endcap base element, and a retracted position, in which the endcap cover element is closer to the endcap base element; - a contact element (217, 219) for electrically connecting the connector pin (205, 207) to the LEDs; - a switch button movable between a first position and a second position, - a first spring mechanism for urging the endcap cover element towards the protracted position; and - a switch opening mechanism configured such that in case the switch button is in the second position, and the endcap cover element moves from the retracted position towards the protracted position over a predetermined distance, the switch button is moved to the first position to block the electrical connection between the contact element (217, 219) and the LEDs,