In a rare incident, a pilot on board an American Airlines flight died mid-air but the plane managed to land safely, airline officials have confirmed.

The overnight flight was en-route to Boston from Nevada, but flight 550 made an emergency landing in Syracuse, New York, after the co-pilot took control of it.

"The airline is incredibly saddened and is focusing on the the pilot's family and colleagues," an American Airline spokesperson told BBC.

Flight 550, an airbus 320, is believed to have departed from Phoenix on Sunday night with 147 passengers and five crew members on board. "When I woke up, the flight attendants told us that because the pilot was ill, we were making an emergency landing," Louisa Anderson, who was one of the passengers, told local reporters.

Although mid-air death of a pilot is a very rare scenario, commenting on the medical condition of pilots, Head of Safety Operations John Cox said, "In the US, it is compulsory for pilot above the age of 40 to have a routine medical examination."

As per rules set out by the Federal Aviation Federation, it is mandatory for two crew members to be present in the cockpit at all times.

"Passengers are never at risk because both the pilots are qualified to fly the airliner alone," safety experts told The Guardian.

The American Airline is yet to reveal the reason behind the pilot's tragic death mid-air.

In India, the Director General of Civil Aviation (DGCA) has set out guidelines for all pilots and crew members. "Irrespective of the airlines, every pilot and airline cabin-crew has to undergo routine medical examinations, every six months," states the DGCA handbook.