Qatar Airways says the captain of one of its planes died onboard a flight from the Philippines to Qatar.

The carrier said the death occurred on Wednesday on Qatar Airways flight 645 from Manila to the Qatari capital, Doha.

The flight was diverted to Kuala Lumpur, Malaysia, where it landed around 11.35am local time. A new crew boarded the plane and it left Malaysia for Doha less than two hours later.

Qatar Airways did not say what caused the pilot’s death or if the flight was ever at risk. It said its priority “remains the comfort and safety of its passengers and staff”.