A safety mechanism for a push-off cap of a medicament delivery device, wherein the safety mechanism comprises: a cap having a proximal end surface provided with a through-opening, which cap is configured to be mounted to a proximal end of a medicament delivery device, and an actuator assembly configured to be received by and extend proximally from the cap, wherein the actuator assembly is linearly displaceable relative to the cap from a first position in which the actuator assembly extends proximally from the cap to a second position in which the actuator assembly is displaced distally and received further by the cap relative to the first position, wherein the actuator assembly has a guide structure configured to guide linear movement of the actuator assembly from the first position to the second position, and a lock assembly having: a proximal top member that is pivotable relative to the guide structure, and a lock structure (nd) extending distally from the proximal top member to the proximal end surface of the cap, wherein the lock structure (nd) is pivotally fixed relative to the proximal top member, and wherein the lock structure is configured to be received by the through-opening of the cap, wherein the proximal top member is pivotable from a first pivot position relative to the guide structure, in which the lock structure (nd) is configured to bear against the proximal end surface of the cap to prevent the actuator assembly from being displaced from the first position to the second position, to a second pivot position relative to the guide structure, in which the lock structure (nd) is configured to align with the through-opening, allowing the actuator assembly to be displaced from the first position to the second position thereby enabling releasing of the cap from a medicament delivery device, when the cap is pressed against a solid surface at a slight angle. a cap having a proximal end surface provided with a through-opening, which cap is configured to be mounted to a proximal end of a medicament delivery device, and an actuator assembly configured to be received by and extend proximally from the cap, wherein the actuator assembly is linearly displaceable relative to the cap from a first position in which the actuator assembly extends proximally from the cap to a second position in which the actuator assembly is displaced distally and received further by the cap relative to the first position, wherein the actuator assembly has a guide structure configured to guide linear movement of the actuator assembly from the first position to the second position, and a lock assembly having: a proximal top member that is pivotable relative to the guide structure, and a lock structure (nd) extending distally from the proximal top member to the proximal end surface of the cap, wherein the lock structure (nd) is pivotally fixed relative to the proximal top member, and wherein the lock structure is configured to be received by the through-opening of the cap, a proximal top member that is pivotable relative to the guide structure, and a lock structure (nd) extending distally from the proximal top member to the proximal end surface of the cap, wherein the lock structure (nd) is pivotally fixed relative to the proximal top member, and wherein the lock structure is configured to be received by the through-opening of the cap, wherein the proximal top member is pivotable from a first pivot position relative to the guide structure, in which the lock structure (nd) is configured to bear against the proximal end surface of the cap to prevent the actuator assembly from being displaced from the first position to the second position, to a second pivot position relative to the guide structure, in which the lock structure (nd) is configured to align with the through-opening, allowing the actuator assembly to be displaced from the first position to the second position thereby enabling releasing of the cap from a medicament delivery device, when the cap is pressed against a solid surface at a slight angle.