An emergency in the cockpit unfolded just before touchdown.