Airport representational image
Over the last couple of months, several flights from Scotland have been forced to make an emergency landing BRIAN SNYDER/Reuters

A flight from Scotland flying to England was forced to make an emergency landing just minutes after take-off.

A Loganair aircraft took off from Edinburgh just before 7 AM on Friday for Southampton, climbing to the cruising level of FL310 (31,000 feet). Approximately 20 minutes later, when the flight was over Dumfries, an emergency was declared with squawk code 7700, according to Aviation Source News. As a result, Flight LOG8TR was forced to divert back to the Scottish capital, where it eventually landed safely.

Later on, the Glasgow-based airline confirmed the emergency alert was issued because of a medical incident on board.

"We can confirm this morning's Edinburgh to Southampton flight returned to Edinburgh after a passenger became unwell onboard. We thank our customers for their understanding and the emergency services for their quick response," a spokesperson of Loganair said in a statement.

Last month, it was reported that a Jet2 flight, which was travelling from Edinburgh to Palma De Mallorca, Spain, was forced to make an emergency landing after a passenger became unwell. The emergency squawking code 7700 was issued above the north of England and the Boeing 737-800 aircraft was forced to divert to Manchester Airport where it landed safely.

In slightly more scary news, a Ryanair flight was forced to land abruptly, leaving cabin crew onboard terrified and "in tears". When Ryanair flight RK178 flight took off from Belfast International Airport for Edinburgh, Scotland on Oct. 17, it had to turn around when a "minor technical issue" emerged on board.

While exact details of the incident were not revealed, some news reports had claimed that an emergency was declared after "a door was left open". According to tracking website Flightradar24, the Irish low-cost carrier took off at 7:48 pm from Belfast on Oct. 17 but was back at the stand in the Northern Ireland airport at 8:25 pm.

Another Jet2 aircraft suffered an incident earlier this year, which led to the flight making an emergency landing. In September, A Jet2 flight, once again travelling from Scotland to Spain, was forced to make an emergency landing after it nearly ran out of fuel. The aircraft had almost 200 people on board when the dramatic event unfolded.

It happened during the time when severe thunderstorms with hurricane-force winds struck Mallorca. The weather caused extensive damage across the island as well as flight chaos, with over 50 flights believed to have been cancelled and 18 flights redirected away from Palma de Mallorca airport.