A Flybe aircraft with 44 passengers and four crew dropped 500ft in 18 seconds after the autopilot system was mistakenly aimed at the ground, according to accident investigators.
The flight from Belfast City airport was a few seconds from crash landing when the crew intervened and no-one was injured.
The autopilot was engaged after the aircraft took off on a flight from to Glasgow.
The Air Accidents Investigation Branch (AAIB) said that the system on the Bombardier Dash 8 Q400 turboprop was switched on at 1,350ft. The aircraft climbed to 1,500ft before it “pitched nose-down and then descended rapidly”.
The autopilot had been set with a target altitude of zero feet. The report told how the aircraft shifted from the nose pointing ten degrees upwards to eight degrees down. Cockpit alarms alerted the captain and first officer.
The report said that they later described becoming “visual with the ground”. The captain disconnected the autopilot and recovered the craft after dropping to 928ft.
The report said that the autopilot was switched on again when the aircraft reached 1,900ft. But the aircraft “started to gradually pitch down” and the captain disconnected it again.
The flight landed safely at Glasgow on January 11.
The AAIB concluded that the crew’s selection of a particular autopilot mode before take-off led to the zero-altitude target.
The report said: “The incorrect autopilot ‘altitude’ mode was active when the autopilot was engaged causing the aircraft to descend toward a target altitude of 0 ft.
“As a result of this event the operator has taken several safety actions including revisions to simulator training and amendments to the taxi checklist.”
An airline spokeswoman said: “Flybe maintains a rigorous approach to ensuring the very highest flying standards are maintained. The safety of our passengers and crew remains our number one priority.”