a potentially dangerous machine is secured to protect against injuries and has first and second tool parts that define an opening gap between them . at least the first tool part is movable relative to the second tool part in a movement direction during an operating cycle for deforming a workpiece between them by reducing a size of the opening gap in the movement direction . the protected zone precedes the first tool part and extends over at least a portion of the opening gap in the direction of relative movement . the protected zone is monitored with an optoelectronic sensor , and a danger signal is generated in response to a breach of the protected zone . when the size of the opening gap in the movement direction becomes smaller than the protected zone , the size of the protected zone is correspondingly reduced until during subsequent closing movements of the first tool part substantially the entire opening gap is within the protected zone .