Air Astana 1388
Air Astana 1388 was a flight on 11 Nov 2008 that went through a harrowing mid-air emergency, fundamentally caused by a maintenance crew in Portugal having wired in the aileron controls backwards, but the wing spoilers in properly. These two components usually work together in tandem to control the plane, so having these two components be wired in oppositely meant the plane “was fighting itself”.
The pilots miraculously managed to land the plane safely, with only one injury on board (a sprained ankle). Only after landing the plane did a fatal error spring up on their dashboard, alerting them to the faulty wiring and warning them they should not take off.
The investigation did implicate a couple of other factors, beyond the maintenance crew, in the incident: the manufacturer’s manual was poorly-written and confusing, and the flight crew had missed the faulty wiring in their pre-flight checkup.