An American Airlines flight from Phoenix to Boston was diverted to Syracuse, New York, Monday morning after the captain became ill and later died, according to an airline spokeswoman.

Andrea Huguely said Flight 550 left Phoenix at 11:55 p.m. local time and was diverted mid-flight, landing shortly after 7 a.m. EDT. She said that after the flight's captain was stricken, the first officer safely landed the plane with 147 passengers and five crew members onboard.

"We are incredibly saddened by this event, and we are focused on caring for our pilot's family and colleagues," the airline statement said.

Details of the medical emergency and the identity of the deceased pilot weren't immediately released. It also wasn't clear when the pilot died.

Huguely said a replacement crew was sent to Syracuse and the plane, an Airbus A320, landed at Boston at 12:30 p.m.

Before the flight landed at Syracuse, the first officer called the airport tower and said in a calm voice, "American 550. Medical emergency. Captain is incapacitated." He requested a runway to land.

In a recording of his exchange with the tower, the officer expresses concern whether ambulance medics can get on the plane quickly. He's assured that they can, and is told to go into a gate where the medics would meet the plane.

Passenger Louise Anderson, who was heading from Reno, Nevada, to Boston via Phoenix, said she had dozed off on the flight.

"What I woke up to was the flight attendant telling us we were making an emergency landing because the pilot was ill," she said.

She said rumors were circulating of the pilot's death in the Syracuse airport, but they were only confirmed by an announcement on their makeup flight to Boston.

Anderson said the mood on board then was somber, but she commended the crew's handling of a tragic situation.

Airline pilots must pass a physical exam every 12 months - every six months for captains if they are 40 or older.

Steve Wallace, who led the FAA's accident-investigations office from 2000 to 2008, said it is rare for a pilot to become incapacitated.

"What is important is the consistent result - the plane lands safely," Wallace said. "The co-pilot is fully qualified to fly the airplane. It's rare, but they train for it."

According to the FAA, seven pilots for U.S. airlines and one charter pilot have died during flights since 1994.

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

"The advantage to that is the co-pilot gets an equal amount of experience, and the captain gets to see how the other guy flies," he said.

Record said the passengers on the American Airlines flight were never in danger. The co-pilot remained calm while describing the emergency and requesting permission from air traffic controllers to land the plane.

"He was doing what he's trained to do - fly the plane," Record said. "He was probably more concerned with the health of his buddy, his crew member," than his ability to fly.

Modern airliners are capable of largely flying themselves. There is a debate in aviation circles about whether over-reliance on automation is eroding the manual flying skills of pilots.

Even if planes can fly by themselves, however, incidents like Monday's help ensure that regulators won't allow unmanned cockpits - or even an unaccompanied pilot - anytime soon.

AP Airlines Writer David Koenig contributed to this report from Dallas; AP writers Alina Hartounian in Phoenix and Mary Esch in Albany, New York, also contributed.