In February 2014 I shared the story of an Ethiopian 767 which was hijacked enroute from Addis Ababa to Rome. While somewhere over Sudan the captain went to use the restroom, at which point the first officer locked him out of the cockpit and declared that the plane was hijacked, requesting the plane land in Switzerland so that the hijacker could receive asylum.
During the incident it wasn’t apparent to the emergency responders on the ground that the hijacker was in fact the pilot, though that was found out once the plane landed in Geneva.
Fortunately the incident ended with no one getting hurt, unlike the subsequent Germanwings crash, where the first officer also locked the captain out of the cockpit, except he flew the plane into the ground.
This is obviously a very complex case, though a ruling has finally been made.