An off-duty pilot reportedly stepped in after the captain in control of the Jet2 aircraft collapsed.
The Boeing 757 made an emergency landing with the substitute pilot helping the co-pilot land the aircraft safely.
The aircraft, which can hold 235 passengers, was flying from Manchester to Funchal, Madeira, when the 40-year-old pilot became unwell.
The 757 was forced to divert to Porto in mainland Portugal to make an emergency landing.
The Jet2 pilot who stepped in to help happened to be on board.
Another passenger said that the off-duty pilot came forward from the back of the aircraft and helped the co-pilot to carry out the unscheduled landing, The Times reported.
The runway at Porto is understood to have been closed for half an hour to allow for the emergency landing. The pilot was then reported to have been taken to hospital.
The airline said that a standby aircraft and replacement crew was being flown to Porto to help the stranded passengers to reach their original destination.
The incident happened after Flight LS765 took off from Manchester at 8.28am yesterday. At about 10.20am the alarm was raised that one of the two pilots on board had fallen ill.
Passenger Nicholas Banks told MailOnline: “They made the announcement that there had been an incident on the flight deck and another Jet2 pilot who happened to be on holiday came forward from the back of the plane.
“He offered up his services to the crew and went into the cabin. He didn’t come out until he helped the pilot off the plane when we landed.”
He added: “The original pilot was wheeled off in a wheelchair with an oxygen mask but we couldn’t really see.
“The crew did a great job. I was quite relaxed because of the spare pilot and that there was a co-pilot.”
The local emergency services said that they had received a request to assist a 40-year-old man, who was taken to hospital as a precaution.
Jet2 said that another pilot on board the aircraft did come forward to offer assistance, and that the first officer followed standard procedure and landed the aircraft.