|The pilot died on board a flight from Manila to Doha [EPA]
The captain of a Qatar Airways plane has died while flying the aircraft from the Philippines to the Qatari capital, Doha.
The assistant pilot took control of the plane and the flight was then diverted to Kuala Lumpur where it landed at around 11.30am local time, Qatar Airways said on Wednesday.
Reports say the pilot died of a heart attack. But the company did not confirm the cause of death, or if the flight was ever at risk.
Qatar Airways said in a statement that its priority "remains the comfort and safety of its passengers and staff".
The British Civil Aviation Authority (CAA) reported 32 occasions in 2009 when pilots were incapacitated during a flight.
In the preceding year co-pilots had to step in 39 times for a wide variety of reasons, including food poisoning, nausea and fainting.
Although modern passenger aircraft are able to fly themselves during most of a flight, the presence of a co-pilot in the cockpit is essential in case of the captain becoming unwell, or of a particularly dangerous emergency situation.
A plane cannot land without human intervention, as it has to be set at the right speed and the flaps have to be set for the approach.