Video footage has emerged of the huge queue British Airways passengers faced as they tried to leave Heathrow airport after a mass flight cancellation.

A major IT failure has led to all BA flights from Heathrow and Gatwick – the largest airports in the UK – being cancelled.

Travellers who had not boarded their flights were asked to leave after scores of flights were cancelled, leading to queues of thousands.

Passengers at Heathrow airport toldIBTimes UK it was taking "hours" to leave the site because of the size of the queues. On social media, some likened it to being imprisoned.

Customers said there was little or no communication from British Airways, and that staff appeared confused and directionless.

The problem was blamed on an unspecified IT failure affecting BA's computer systems.

In a statement, the airline said: "Following the major IT system failure experienced earlier today, with regret we have had to cancel all flights leaving from Heathrow and Gatwick for the rest of today.

"The system outage has also affected our call centres and our website but we will update customers as soon as we are able to.

"We are extremely sorry for the inconvenience this is causing our customers during this busy holiday period."