A DIN-rail mount type device (100; 100') configured to be removably mounted to a DIN rail (200; 200'), the DIN-rail mount type device (100; 100') comprising a housing (110; 110'); a rail groove (112; 112') provided along a width direction of the housing (110; 110') on a face (111B; 111B') of the housing (110; 110') and being capable of fitting with the DIN rail (200; 200'); a slider groove (113; 113') provided along a width direction of the rail groove (112; 112') on the face (111B; 111B' of the housing (110; 110'); and a lock member configured to slide so as to move forward and backward with respect to the rail groove (112; 112') in the slider groove (113; 113'), and to be able to retain a fitting state between the rail groove (112; 112') and the DIN rail (200; 200') by engaging a one-side end with an engagement portion of the DIN rail (200; 200') fitted into the rail groove (112; 112'), wherein: the lock member is configured to be able to move to a first position where the one-side end protrudes from the slider groove (113; 113') into the rail groove (112; 112'), and other-side end protrudes out of the housing (110; 110') and to a second position where the one-side end protrudes from the slider groove (113; 113') into the rail groove (112; 112') and the other-side end is stored in the slider groove (113; 113'), configured to be able to retain the fitting state between the rail groove (112; 112') and the DIN rail (200; 200') by engaging the one-side end with the engagement portion of the DIN rail (200; 200') at the first position, and configured to be able to move to the second position only when the DIN rail (200; 200') is not fitted into the rail groove (112; 112'), wherein: the lock member is configured to be able to move to a third position where the one-side end is stored in the slider groove (113; 113') and the other-side end protrudes out of the housing (110; 110'), and to move between the third position and the second position, characterized in that: the lock member comprises at least one spring portion configured to be able to retain, when the lock member moves in the slider groove (113; 113'), the lock member at the first position, the second position, and the third position by sequentially engaging with a plurality of recesses (117, 118, 119) provided in the slider groove (113; 113'). the lock member is configured to be able to move to a first position where the one-side end protrudes from the slider groove (113; 113') into the rail groove (112; 112'), and other-side end protrudes out of the housing (110; 110') and to a second position where the one-side end protrudes from the slider groove (113; 113') into the rail groove (112; 112') and the other-side end is stored in the slider groove (113; 113'), configured to be able to retain the fitting state between the rail groove (112; 112') and the DIN rail (200; 200') by engaging the one-side end with the engagement portion of the DIN rail (200; 200') at the first position, and configured to be able to move to the second position only when the DIN rail (200; 200') is not fitted into the rail groove (112; 112'), the lock member is configured to be able to move to a third position where the one-side end is stored in the slider groove (113; 113') and the other-side end protrudes out of the housing (110; 110'), and to move between the third position and the second position, characterized in that: the lock member comprises at least one spring portion configured to be able to retain, when the lock member moves in the slider groove (113; 113'), the lock member at the first position, the second position, and the third position by sequentially engaging with a plurality of recesses (117, 118, 119) provided in the slider groove (113; 113'). the lock member comprises at least one spring portion configured to be able to retain, when the lock member moves in the slider groove (113; 113'), the lock member at the first position, the second position, and the third position by sequentially engaging with a plurality of recesses (117, 118, 119) provided in the slider groove (113; 113').