Many aviation authorities require that there be at least two crew members in the cockpit.
A pilot on a SriLankan Airlines flight between Sydney and Colombo trapped his female co-pilot from the cockpit while she was taking a mid-air toilet break.
The incident was reported during a 10-hour flight when the pilot took a break without having a replacement in the cockpit as per standard operating procedure. This caused a conflict between the two pilots.
The male pilot locked the female pilot out when she tried to go to the bathroom. To remedy the situation, the flight attendant used the communications link to the cockpit to urge the first officer back to the captain.
The Sri Lanka Civil Aviation Authority is investigating the incident. Meanwhile, the airline said it is fully cooperating with the investigation and the male pilot will be removed from service until the investigation is complete.
Keeping safety concerns in mind, some airlines and aviation authorities require at least two crew members to be in the cockpit at all times during a flight.