American Airlines aircraft. (Joshua Roberts/Reuters)

The captain of an American Airlines flight safely landed the plane Wednesday afternoon after his co-pilot died in the cockpit minutes before landing, according to an airline official.

Flight 1353 was two miles from Albuquerque International Sunport when the captain declared an emergency, citing a “medical issue” aboard shortly after 3:30 p.m. local time, according to a Federal Aviation Administration spokesman.

First officer William “Mike” Grubbs, 58, fell ill just as the plane reached its last phases of landing, according to the airline.

“Despite heroic efforts to revive him, Mike passed away,” American Airlines chief executive Doug Parker said in a letter to airline workers Thursday morning.  “We are deeply saddened over the loss of one of our American Airlines family.”

The captain landed the plane without incident, and the aircraft taxied to the gate where it was met by paramedics, officials said. CPR was performed for 35 to 40 minutes before the pilot was pronounced dead, according to CNN.

An airline spokesman said he could not provide details about the cause of death.

Grubbs, who was based in Dallas, was a Boeing 737 pilot who joined American in 2010 from Envoy, Parker said.  He said the pilot “was particularly proud of his son, Travis, who is graduating from Tennessee Tech this May.”

The aircraft had 136 passengers and six crew members — including the pilot and co-pilot — on board when it left Dallas Forth-Worth Wednesday afternoon for Albuquerque.

“Our team is fully focused on taking care of Mike’s family at this time. Please join us in keeping Mike’s family and friends in your thoughts and prayers,” Parker said.

In 2015, a pilot died after falling ill during an overnight flight from Phoenix to Boston. That plane was diverted to Syracuse, but the pilot died on flight.

This post has been updated.

More airline news:

United Airlines: ‘Your leggings are welcome’ — as long as you’re paying for your flight

What you need to know about the airline electronics ban

Travel groups say they support enhanced security measures but want to hear justification for electronics ban