United Airlines Flight 1603 was forced to make an emergency landing after its pilot suffered a fatal heart attack in mid-air. The Boeing 737 plane landed in Boise, Idaho, where the pilot was met by emergency responders and taken to a nearby hospital.

“United flight 1603 from Houston to Seattle diverted to Boise, Idaho, tonight when a crew member experienced a medical emergency,” United Airlines said in a statement. “The flight landed safely, and paramedics met the plane upon arrival and transported the crew member to the hospital. We are working to re-accommodate customers as soon as possible.”

According to passengers aboard the flight, a doctor who happened to be on the plane was able to assist in cardiopulmonary resuscitation (CPR) before reaching the Boise airport. Upon arrival, the pilot was immediately transported to Saint Alphonsus Hospital, where he was pronounced dead during treatment.

“I am sad to confirm that our co-worker passed away last night. Our thoughts are with his family at this time,” a United Airlines representative, Christen David, told the Associated Press.

The flight landed in Boise around 8 p.m. and stayed on the ground until a replacement pilot was found to complete the trip. Even before the plane landed safely in Seattle just before midnight, passengers aboard the flight commended the flight crew and United Airlines on how the emergency was handled.