A passenger plane had to bank sharply to avoid being hit by a military jet climbing through clouds above Leuchars.
An investigation discovered both pilots rated the risk of collision as “high”.
The UK Airprox Board revealed two Typhoons were flying one behind the other when the passenger plane’s pilot picked them up on the traffic alert and collision avoidance system.
A trainee air traffic controller at RAF Leuchars asked the Typhoon pilot to “stop climb” on realising the imminent “danger”.
The pilot “did not comprehend” whether or not the call was for him or the Typhoon ahead, however. Air traffic control then gave the passenger pilot a new course and an instruction to “turn immediately”.
The report said: “In accordance with the airline’s operating procedures, the autopilot was disconnected and the aircraft was rolled quickly using 45-60 degrees angle of bank.”
The incident involved an Eastern Airways 50-seater Embraer aircraft, flying from Aberdeen to Norwich, which was passing high above Leuchars airfield.
The planes passed within 900ft of each other and the incident was graded B just one level below “serious risk of collision”.
The incident happened in August 2013 but has only just been revealed.