Jet2 Boeing 737-300 taking off from El Prat Airport in Barcelona, Spain

A flight on the low-cost carrier Jet2.com took a scary turn Monday when one of the pilots reportedly passed out mid-flight.

According to The Sun, Jet2 Flight LS765 was en route from Manchester, England, to Funchal, Madeira, when the airline said one of the pilots operating the plane began to feel “unwell.” Luckily, an off-duty pilot was flying on the same aircraft and joined the flight crew for the remainder of the journey.

The other pilot on the Jet2 flight called for an emergency landing at Porto Airport in Portugal, which was temporarily closed to ensure it would be ready to handle the incoming plane in case something went wrong. The airport was closed for about 40 minutes.

The official Twitter account of Jet2 shared more information on the incident:

A passenger on the impacted flight said that after the plane had landed safely in Portugal, emergency personnel boarded and put the ill pilot in a wheelchair. He was removed from the aircraft wearing an oxygen mask, but his condition was not yet known.

While some passengers were booked on a later flight, Jet2 announced it was sending a standby aircraft and replacement crew to Porto for the continuation of their journey to Funchal.