Contrary to popular belief, a pilot will not always land the plane immediately if a passenger dies. If a passenger is officially pronounced dead mid-flight, the captain will consult with ground-based medical experts (like MedAire) to decide the best course of action. If the flight is already several hours into a long-haul journey and the death is confirmed, the crew will often prioritize the dignity of the deceased and the distress of other passengers by moving the body to a more discreet location, such as an empty row or a crew rest area, covering them with a blanket. The flight usually continues to its scheduled destination unless there are legal or logistical reasons to divert. A diversion is more likely for a medical emergency where life-saving intervention is still possible. Once the plane lands at its final destination, all other passengers usually disembark first to allow local authorities and medical teams to board and process the fatality with privacy and respect.