A drone came within 20m (65ft) of a passenger plane as it flew in to Gatwick Airport in the summer, an inquiry into near misses has found.
UK Airprox Board (UKAB) said the pilot of the Airbus A320 shouted "drone" when he spotted the device, which was also seen by the co-pilot, on 8 July.
The crew was unable to take evasive action and the risk of collision was "high", the report said.
It concluded the near-miss was a category A - the highest risk.
The Civil Aviation Authority said it could not identify the airline involved but added the plane could carry up to 179 passengers.
The Airbus was at an altitude of 106m (350ft) and one minute from landing when the drone was spotted.
As well at being flown above the maximum permitted height, the device was also within controlled airspace, UKAB said.
The co-pilot - said to be a drone enthusiast - identified it as a DJI Inspire, it added.
The crew then watched as it "passed down the left side of the aircraft at the same level".
At its closest point, the drone was level with the aircraft and came within 20m of its wing, the Civil Aviation Authority confirmed.
Had the autopilot still been engaged, the crew believed there was a "very high probability" the aircraft would have struck the drone, investigators found.
The report said the near miss was reported to police after the aircraft landed.
In April, a pilot was forced to take an unplanned turn to avoid crashing with a drone in another "high risk" near miss at Gatwick.
Drone sightings at the airport in December caused about 1,000 flights to be cancelled or diverted over 36 hours, affecting more than 140,000 passengers.
Heathrow, Leeds Bradford and Dublin airports have also been forced to suspend flights due to drone activity this year.