A construction machine comprising: a vehicle body having a moving section; a driving mechanism (23, 123) that generates a driving force to drive the moving section; a manipulation device that receives a manipulation given to drive the moving section; a controlling unit that controls an operation of the driving mechanism; a manipulation detecting unit that detects the manipulation given to the manipulation device and outputs a signal corresponding to an instruction of the manipulation to the controlling unit; an obstacle detecting device that is mounted on the vehicle body to detect an obstacle in a periphery of the vehicle body; and a storage unit that stores an instruction of a manipulation given to the manipulation device, characterized in that the controlling unit executes emergency-stop-processing and continuous-stop-processing, the emergency-stop-processing being executed to control the driving mechanism to stop an operation of the moving section regardless of a signal from the manipulation detecting unit, on a first condition satisfied upon detection of the obstacle by the obstacle detecting device when the controlling unit receives the signal from the manipulation detecting unit to control the driving mechanism to drive the moving section in accordance with a manipulation input to the manipulation device, the continuous-stop-processing being executed to control the driving mechanism to keep the operation of the moving section, which has been stopped by the emergency-stop-processing, stopped on a second condition satisfied by the obstacle detecting device not detecting the obstacle and the manipulation detecting unit detecting a manipulation given to the manipulation device when the operation of the moving section is stopped by the emergency-stop-processing, the controlling unit further executes storage-processing and determination-processing, the storage-processing being executed to store first manipulation information in the storage unit, the first manipulation information being an instruction of the manipulation detected by the manipulation detecting unit when the emergency-stop-processing is executed, the determination-processing being executed to determine whether the first manipulation information stored in the storage unit corresponds with second manipulation information that is an instruction of the manipulation newly detected by the manipulation detecting unit when the emergency-stop-processing is executed and the obstacle detecting device does not detect the obstacle, and the controlling unit executes in the determination-processing the continuous-stop-processing when the second condition is satisfied and it is determined that the first manipulation information corresponds with the second manipulation information. a vehicle body having a moving section; a driving mechanism (23, 123) that generates a driving force to drive the moving section; a manipulation device that receives a manipulation given to drive the moving section; a controlling unit that controls an operation of the driving mechanism; a manipulation detecting unit that detects the manipulation given to the manipulation device and outputs a signal corresponding to an instruction of the manipulation to the controlling unit; an obstacle detecting device that is mounted on the vehicle body to detect an obstacle in a periphery of the vehicle body; and a storage unit that stores an instruction of a manipulation given to the manipulation device, characterized in that the controlling unit executes emergency-stop-processing and continuous-stop-processing, the emergency-stop-processing being executed to control the driving mechanism to stop an operation of the moving section regardless of a signal from the manipulation detecting unit, on a first condition satisfied upon detection of the obstacle by the obstacle detecting device when the controlling unit receives the signal from the manipulation detecting unit to control the driving mechanism to drive the moving section in accordance with a manipulation input to the manipulation device, the continuous-stop-processing being executed to control the driving mechanism to keep the operation of the moving section, which has been stopped by the emergency-stop-processing, stopped on a second condition satisfied by the obstacle detecting device not detecting the obstacle and the manipulation detecting unit detecting a manipulation given to the manipulation device when the operation of the moving section is stopped by the emergency-stop-processing, the controlling unit further executes storage-processing and determination-processing, the storage-processing being executed to store first manipulation information in the storage unit, the first manipulation information being an instruction of the manipulation detected by the manipulation detecting unit when the emergency-stop-processing is executed, the determination-processing being executed to determine whether the first manipulation information stored in the storage unit corresponds with second manipulation information that is an instruction of the manipulation newly detected by the manipulation detecting unit when the emergency-stop-processing is executed and the obstacle detecting device does not detect the obstacle, and the controlling unit executes in the determination-processing the continuous-stop-processing when the second condition is satisfied and it is determined that the first manipulation information corresponds with the second manipulation information.