Image copyright Facebook Image caption Michael Johnston had heart surgery in 2006, his wife said

The pilot who collapsed and died on an American Airlines overnight flight from Phoenix to Boston has been identified.

Cpt Michael Johnston, 57, was flying the plane with 147 passengers and five crew on board when he "passed away while at work", the airline said.

The first officer took over and made an emergency landing in Syracuse.

Media playback is unsupported on your device Media caption Safety protocol kicks in if a captain is incapacitated in the cockpit

Johnston's wife told local TV she had been told her husband had probably died of a heart attack. He had had double heart bypass surgery in 2006.

Cpt Johnston had been flying as a first officer and then as a captain since 1990.

Medics waiting on the tarmac pronounced him dead at the scene.

Media playback is unsupported on your device Media caption In a call to the control tower, the co-pilot asked to divert Flight 550 to Syracuse, in New York state

Passengers on the flight said they had experienced a quick descent and some turbulence before hearing a member of the flight crew announce that the captain was unwell.

They learned of his death on a later flight to Boston manned by a new crew.

Image copyright Getty Images Image caption The flight, bound for Boston, had 147 passengers on board

American Airlines chairman Doug Parker said the airline "couldn't be more proud of the teamwork this crew showed during an extremely difficult time".

Airline pilots must pass physical exams every 12 months - and every six months for captains who are 40 or older.

Aviation experts said there was never any danger to passengers, because pilots and co-pilots were equally capable of flying.

Captains and co-pilots usually take turns flying and handling takeoffs and landings, said former airline pilot James Record, who teaches aviation at Dowling College in New York.

Image copyright PA Image caption Ryanair's boss has argued two pilots are unnecessary on short-haul flights

Death in the cockpit

Incidents of pilots collapsing are rare, however the US Federal Aviation Administration says seven US airline pilots and one charter pilot have died during flights since 1994.

In August, a woman in Spain with no flying experience was seriously injured when she crash landed a light aircraft after the pilot lost consciousness. A similar incident happened in the UK in 2013.

In 2010, Ryanair boss Michael O'Leary argued two pilots were unnecessary on short-haul flights, saying that over 25 years only one of his pilots had suffered a heart attack mid-flight, "and he landed the plane". But the European Aviation Safety Agency has since recommended there should always be two people in the cockpit at any time.