Several weeks before the Germanwings French Alps crash, a Dutch pilot warned of the risks of being locked outside the cockpit.

Less than two months before co-pilot Andreas Lubitz, 27, locked his captain out of the cockpit and crashed an Airbus 320 killing 150 people on board, Jan Cocheret, a Boeing 777 pilot, said: "I seriously wonder who's sitting next to me.

"I hope I never find myself in the situation where I go to the toilet and return to find a cockpit door that won't open."

Writing in flight magazine Piloot en Vliegtuig (Pilot and Plane), Cocheret said certain security measures that have been designed following the 9/11 attacks could in fact work against a plane's captain.

Cocheret's fears came alive when Lubitz locked himself in the cockpit just as his captain took a toilet break.

Lubitz next disabled the system that would allow the captain to re-enter the cockpit using a security code.

"I seriously sometimes wonder who's sitting next to me in the cockpit. How can I be sure that I can trust him? Perhaps something terrible has just happened in his life and he's unable to overcome it," wrote Cocheret in the magazine column, reported The Telegraph.

"There indeed does exist a way to get back into the cockpit, but if the person inside disables this option (the security code to get in), one could do nothing but sit with the passengers and wait and see what happens."

According to Cocheret, there have been several instances of pilots shutting out colleagues.

Referring to the disappearance of the Air Malaysia flight last year heading from Kaula Lumpur to Beijing, Cocheret said: "A year later, still no one knows what happened to the missing Malaysian Boeing 777.

"One of the scenarios which is still being investigated is a deliberate takeover by one of the pilots when his colleague briefly left the cockpit.

"I sometimes seriously wonder who is sitting next to me in the cockpit, whether the plane belongs to a large or a small company or is a business or sports aircraft. Whether you know the person or have long enjoyed being with him in the cockpit, who can guarantee that you can trust him?"