A plane crashed 500 feet (152m) in 18 seconds after setting the wrong autopilot caused the plane to land, an investigation was found.
Forty-four passengers and four crew members were on a Flybe flight from Belfast City Airport to Glasgow Airport when the incident occurred shortly after taking off on 11 January.
The first captains and officers reported that they had "become visual with the ground" when the plane crashed.
A report by the Air Accident Investigation Branch (AAIB) said the autopilot was involved when the Bombardier Dash 8 Q400 turboprop aircraft reached a height of 1,350 feet (411m).
It continued to rise to 1,500 feet (457m), but "pitched down and then dropped rapidly" when the autopilot was installed with an accidental zero foot height target.
The cockpit alarm reminded the captain and first officer of what had happened and the captain decided to autopilot and recover the plane, with it dropping to 928 feet (283m).
The fastest, the plane dropped at 4,300 feet (1,311m) per minute, indicating it might have touched the ground just seconds later if the crew did not intervene.
They continued their flight to Glasgow and landed without further incident.
AAIB concluded that the selection of a particular autopilot mode crew – which is used to automatically control the aircraft – before taking off leads to a zero height target.
Flybe has taken several security measures in response to the incident, including simulator training revisions and amendments to the pilot pre-take off checklist.
A spokesman for the airline said: "Flybe maintains a strict approach to ensuring the highest flying standards are maintained.
"As reported by AAIB, Flybe implemented corrective actions quickly in response to these incidents and our training and procedures have been changed to minimize the risk of recurrence.
"Flybe operates more than 158,000 flights per year and the safety of our passengers and crew remains our number one priority."