The present invention relates to a locking mechanism (1) that provides for the door moving inside a guide rail in aircrafts to stay safely at an open position and released during a flight or when the aircraft is parked. Said mechanism (1) which enables the doors of aircrafts to be slid upwards and to be locked at a predetermined position, provides the door to be locked at a fully open position and to be suspended and released when desired.