Author Ian Rankin has branded Edinburgh Airport security "embarrassing" after he was caught in a lengthy queue.

The bestselling writer complained about the airport's "overrun" system after he found himself delayed at 7.30am yesterday.

The airport is testing a new security hall alongside its existing one.

This involves what it calls an "airlock system" - letting some passengers through the new lounge, then closing the doors to allow other passengers through the old one.

Rankin tweeted: "One X-ray machine in use at 7.30am. Having to lock passengers out because you're overrun? Embarassing."

Followers were quick to agree with his sentiments.

Jourdan McC replied: "Been going on for a few weeks. Total disaster! Has convinced me back to trains."

Rankin is one of several people who have criticized the airport's lengthy security process.

Edinburgh West MP Mike Crockart said on Monday: "Shiny new security system looks lovely. Unfortunately takes ten times as long to get through."

The new security facility is one and a half times larger than the current hall, and incorporates facial recognition and new hand luggage scanners. The next development will transform the existing security hall into a duty free shopping area.

The busy airport had a record-breaking summer, with more than 1.1 million passengers passing through the terminals in July alone. The new security system has promised to "minimise the hassle and drastically cut queueing, potentially eliminating it altogether".

Edinburgh Airport was quick to respond to Mr Rankin's tweet saying: "We're currently testing our new security hall and running two halls. We have an airlock process so we can do that safely.

"We're not locking anyone out. Sorry your experience was not what you're used to. We'll be fully operational in the new hall soon."

A spokesman for Edinburgh Airport later said: "We're currently in the process of transitioning between our old and new security halls.

"As a result of this, some passengers have experienced a slightly longer security process than we would like. Passengers are not being locked out of either security hall. This is an air-lock process to allow us to run both areas safely.

"We're working hard to ensure our security system works as efficiently as possible. We apologise if this has caused an inconvenience to our passengers and thank them for their continued patience."