A plane fell 500ft (152m) in 18 seconds after an incorrect autopilot setting caused it to aim for the ground, an investigation has found.
Forty-four passengers and four crew were on board the Flybe flight from Belfast City Airport to Glasgow Airport when the incident occurred shortly after take-off on 11 January.
The captain and first officer reported they had "become visual with the ground" when the plane dropped.
A report by the Air Accidents Investigation Branch (AAIB) said autopilot was engaged when the Bombardier Dash 8 Q400 turboprop aircraft reached an altitude of 1,350ft (411m).
It continued to climb to 1,500ft (457m), but "pitched nose-down and then descended rapidly" when the autopilot was set with a target altitude of zero feet by accident.
Cockpit alarms alerted the captain and first officer to what was happening and the captain disconnected autopilot and recovered the aircraft, with it having dropped to 928ft (283m).
At its fastest, the plane descended at 4,300ft (1,311m) per minute, suggesting it may have hit the ground just a few seconds later if the crew had not intervened.
They continued the flight to Glasgow and landed without further incident.
The AAIB concluded that the crew's selection of a particular autopilot mode – which are used to automatically control aircraft – before take-off led to the zero altitude target.
Flybe has taken several safety measures in response to the incident, including revisions to simulator training and amendments to pilots' pre-take-off checklists.
A spokeswoman for the airline said: "Flybe maintains a rigorous approach to ensuring the very highest flying standards are maintained.
More from UK
"As reported by the AAIB, Flybe implemented remedial actions quickly in response to the incident and our training and procedures have been amended to minimise the risk of a re-occurrence.
"Flybe operates over 158,000 flights a year and the safety of our passengers and crew remains our number one priority."