A Loganair plane bound for Aberdeen was redirected to Edinburgh last night after the pilot declared a mid-air alert.
Flight LM46 took off from Bristol at 9.07pm and was heading for the Granite City, but was unexpectedly diverted to the capital.
The plane redirected to Edinburgh after a 'Squawk 7700' was activated shortly after it crossed the border into Scotland at around 10pm on Thursday. The code signals an emergency onboard.
Tracker website flightradar24 appeared to show the flight slightly diverting course after passing Berwick-upon-Tweed before circling over the North Sea twice.
The plane then headed west towards the capital, where it touched down at around 10.40pm.
It is not yet known what sparked the onboard emergency.
Another Loganair flight which left Inverness Airport at 9.46pm to head for East Midlands, also declared a mid-air emergency.
The LM763 performed an emergency landing at Edinburgh airport after circling Midlothian for around an hour.
A spokesperson for Loganair said: “Due to an operational and weather related issue, a Loganair flight operating from Bristol to Aberdeen made a precautionary decision to land in Edinburgh. Our passengers were then transported to Aberdeen.
"The diversion to Edinburgh was completely cautionary and at no time were any emergencies declared by the Loganair crew.
“Separately and unrelated, a cargo flight with no passengers aboard diverted temporarily to Edinburgh. It then continued on its flight to its final destination.”
Don't miss the latest news from around Scotland and beyond - sign up to our daily newsletter here.