Method for preventing the drifting of an elevator car away from the stopping floor, in which method: a) the operating condition of one or more machinery brakes of the hoisting machine of the elevator is monitored regularly by a first monitoring part of the operating condition of the machinery brake, characterized in that: b) the elevator car leaving the door zone of the stopping floor is stopped when the door of the elevator car and/or the landing door is/are open by using the aforementioned one or more machinery brakes of the hoisting machine c) starting of the next run of an elevator car that has left the door zone of the stopping floor when the door of the elevator car and/or the landing door is/are open is prevented d) information about the drive prevention is recorded in the non-volatile memory of elevator control unit whereby for preventing the drifting of the elevator car away from the stopping floor the movement of the elevator car is monitored by a second monitoring part for the car movement comprising a contactor in a safety circuit of the elevator, which contactor is controlled by a door zone supervision circuit in response to the position information of the elevator car expressed by door zone sensors (5A, 5B) of the elevator, to the information about the position and/or locking of the elevator car door expressed by its position sensor, as well as to the information about the position and/or locking of the landing door expressed by its position sensor, and when the supervision circuit, which is comprised in the second monitoring part and fitted in connection with a control coil of the contactor, detects that the elevator car has left the door zone of the stopping floor when the elevator car door and/or the landing door is/are open, it disconnects the current supply to the control coil of the contactor as to open a safety circuit of the elevator disconnecting current flow to a coil of a brake contactor of the machinery brake as well as to a coil of a main contactor of the elevator. a) the operating condition of one or more machinery brakes of the hoisting machine of the elevator is monitored regularly by a first monitoring part of the operating condition of the machinery brake, b) the elevator car leaving the door zone of the stopping floor is stopped when the door of the elevator car and/or the landing door is/are open by using the aforementioned one or more machinery brakes of the hoisting machine c) starting of the next run of an elevator car that has left the door zone of the stopping floor when the door of the elevator car and/or the landing door is/are open is prevented d) information about the drive prevention is recorded in the non-volatile memory of elevator control unit whereby for preventing the drifting of the elevator car away from the stopping floor the movement of the elevator car is monitored by a second monitoring part for the car movement comprising a contactor in a safety circuit of the elevator, which contactor is controlled by a door zone supervision circuit in response to the position information of the elevator car expressed by door zone sensors (5A, 5B) of the elevator, to the information about the position and/or locking of the elevator car door expressed by its position sensor, as well as to the information about the position and/or locking of the landing door expressed by its position sensor, and when the supervision circuit, which is comprised in the second monitoring part and fitted in connection with a control coil of the contactor, detects that the elevator car has left the door zone of the stopping floor when the elevator car door and/or the landing door is/are open, it disconnects the current supply to the control coil of the contactor as to open a safety circuit of the elevator disconnecting current flow to a coil of a brake contactor of the machinery brake as well as to a coil of a main contactor of the elevator.