A drone came within 100ft (30m) of a passenger plane flying above the Scottish Borders this summer.
A report to the UK Airprox Board said the risk of collision over the village of Dewar on 12 August was “very high”.
The Airbus A320 was flying at a height of 7,000ft (2,100m) when the incident occurred – even though drones are not allowed to fly above 400ft (120m).
The board said the drone was also in controlled airspace and was “endangering other aircraft”.
It was one of more than a dozen drone, balloon, model or unknown object incidents put before UKAB last month.
Earlier this year a drone was spotted by plane crews landing at Edinburgh Airport.
In the latest incident the pilot reported seeing a black drone – possibly with blue markings – flying directly ahead and above the aircraft.
The UKAB concluded “providence had played a major part in the incident and/or a definite risk of collision had existed”.