A downhole disconnect device for disconnecting an intervention tool from a wireline, said device comprising: a motor axially mounted in a first tubular body (2, 3, 4, 5) having a drive shaft extending from a first end thereof; a power source disposed in the first tubular body; a sensor disposed in the first tubular body for detecting when the device is motionless and transmitting an output signal based thereon; a controller disposed in the first tubular body for receiving the output signal and configured to delay operation of the motor on receipt of the output signal by a predetermined time; wherein the drive shaft is engageable with a disconnect member slideably mounted and axially arranged in a second tubular body (6, 13) of the device whereby rotation of the drive shaft by the motor causes axial movement of the disconnect member; a locking sleeve; further comprising a first and a secondary locking means; the first locking means comprising at least one first locking member to lock the first and second tubular bodies together, wherein the locking sleeve forces the said at least one first locking member against a portion of the first tubular body to securely connect the first tubular body to the second tubular body, when in a deployed locked configuration; and the secondary locking means comprising one or more second locking members adapted to constrain the locking sleeve in an axial direction with respect to the second tubular body when in a deployed locked configuration; wherein the disconnect member is coupled to at least one of the second locking members which in turn is engageable with the second tubular body when in the deployed locked configuration to connect the first and second tubular bodies together, whilst allowing, upon movement of the disconnect member in an axial direction, the first and second tubular bodies to be disconnected when, firstly, the second locking member is in a retracted position such that the locking sleeve is no longer constrained in the said axial direction and the disconnect device is in an initial stage of disconnect; and continued movement of the disconnect member in the said axial direction moves the locking sleeve in the said axial direction such that the first locking members are unconstrained by the locking sleeve and thereby disengage from the first tubular body; the first tubular body being directly or indirectly connectable to a wireline and the second tubular body being directly or indirectly coupleable to an intervention tool. a motor axially mounted in a first tubular body (2, 3, 4, 5) having a drive shaft extending from a first end thereof; a power source disposed in the first tubular body; a sensor disposed in the first tubular body for detecting when the device is motionless and transmitting an output signal based thereon; a controller disposed in the first tubular body for receiving the output signal and configured to delay operation of the motor on receipt of the output signal by a predetermined time; wherein the drive shaft is engageable with a disconnect member slideably mounted and axially arranged in a second tubular body (6, 13) of the device whereby rotation of the drive shaft by the motor causes axial movement of the disconnect member; a locking sleeve; further comprising a first and a secondary locking means; the first locking means comprising at least one first locking member to lock the first and second tubular bodies together, wherein the locking sleeve forces the said at least one first locking member against a portion of the first tubular body to securely connect the first tubular body to the second tubular body, when in a deployed locked configuration; and the secondary locking means comprising one or more second locking members adapted to constrain the locking sleeve in an axial direction with respect to the second tubular body when in a deployed locked configuration; wherein the disconnect member is coupled to at least one of the second locking members which in turn is engageable with the second tubular body when in the deployed locked configuration to connect the first and second tubular bodies together, whilst allowing, upon movement of the disconnect member in an axial direction, the first and second tubular bodies to be disconnected when, firstly, the second locking member is in a retracted position such that the locking sleeve is no longer constrained in the said axial direction and the disconnect device is in an initial stage of disconnect; and continued movement of the disconnect member in the said axial direction moves the locking sleeve in the said axial direction such that the first locking members are unconstrained by the locking sleeve and thereby disengage from the first tubular body; the first tubular body being directly or indirectly connectable to a wireline and the second tubular body being directly or indirectly coupleable to an intervention tool.