An apparatus in an elevator for detecting and stopping an uncontrolled movement of the car when a machine brake intended to keep the elevator car immovable is on. The apparatus comprises a motion detector (1) for detecting movement of the car (2) and the length of the movement when the machine brake is on (10), a stopping device (3) for stopping an uncontrolled movement of the car, and limit and control means (4) for defining an allowed car movement and controlling the operation of the stopping device according to information obtained from the motion detector.