A US pilot has died after collapsing in an airplane bathroom en route to Chile, while 271 passengers were on board.
Captain Ivan Andaur, 56, started feeling unwell three hours into the LATAM Airlines flight from Miami to Santiago.
The 25-year veteran of the skies reportedly collapsed in a bathroom, and other crew members had to give him emergency first aid.
Luckily, a relief captain and first officer were both on board to help when the situation unfolded.
In a statement, LATAM Airlines said it had to divert 30 minutes to Tocumen International Airport in Panama City due to a "medical emergency for one of the three command crew".
When the LA505 flight landed in Panama, local emergency services helped the man, but he was subsequently declared deceased.
"We are deeply grateful for his 25-year career and his valuable contribution, which was always distinguished by his dedication, professionalism, and dedication," the airline said.
The crew followed all safety protocols during the flight, it added.
The flight continued onwards to Chile a day later.
It's not the first US flight this year where a pilot has suddenly become unwell - a Southwest Airlines flight from Nevada to Ohio in March had to return just after takeoff, due to one of its pilots falling sick.
US airline pilots need their medical certificate renewed every year for under 40s, and twice a year for over 40s.