The first officer of the Britannia Airways flight landed the aircraft with the body of the pilot still strapped into the seat next to him.
Roger Attenborough, 54, died from a suspected heart attack while the Boeing 757 flight from Luton was at around 12,000 feet, less than 15 minutes from landing in Spain.
A spokesman for Britannia said flight BY 476A, which had taken off at 3 15pm on Sunday, proceeded normally. Captain Attenborough did not collapse on the the aircraft's controls because it was in the "descent phase" and both pilots were therefore wearing their full harnesses. Most of the passengers were unaware that anything had happened until after the plane landed.
After the jet touched down, resuscitation attempts were made but the pilot was declared dead by the local coroner. The first officer, who has not been named by the airline, had radioed ahead for medical assistance. All first officers are trained to handle flights on their own.
Captain Attenborough, married with two grown-up sons, had joined the airline in 1969 and had been a captain for 20 years.
One of his sons, Royd, who is also a pilot, said: "It has come as a complete shock. Dad was fit and well and passed all his six-month medicals with flying colours."
The worst disaster at Heathrow occurred in June 1972 after Stanley Key, the 52- year-old pilot of a Trident carrying 118 people, had a heart attack at the controls following an argument with colleagues. He apparently fell on the controls two minutes after take-off, causing a fatal stall. The aircraft crashed near Staines killing all aboard.