A pilot on an overnight flight from Phoenix to Boston in the US had a medical emergency and died.

The American Airlines aircraft landed safely when the co-pilot took over the controls and diverted to Syracuse, New York.

The airline is “incredibly saddened” and focusing on the pilot’s family and colleagues, a spokeswoman said.

Flight 550 left Phoenix before midnight on Sunday and landed on Monday morning.

The pilot appeared ill during the flight, prompting the diversion, the spokeswoman told the BBC.

A new crew was sent to Syracuse to fly the passengers to Boston, where they arrived on Monday early afternoon.

There was never a question about whether the flight would be able to land safely, the spokeswoman said.

“We’re certainly well qualified to handle situations like these,” she said. “That’s why you’ve got more than one pilot in a cockpit.”